孙广东 2015.7.21

本节提供了与网络系统一起使用的组件的具体信息。

10、Network Proximity Checker

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Your name Your email Suggestion *Submit suggestion

Cancel

NetworkProximityChecker 是一个组件,它能够用来控制 网络client,基于网络玩家 接近的对照度的对象。若要使用它。请将该组件放在一定范围内可见的对象上。此类依赖于物理计算的可见性。

Properties

Property: Function:
visRange The range that the object should be visible in.
visUpdateInterval how often in seconds the object should check for players entering it’s visible range.
checkMethod Which type of physics to use for proximity checking.
Network Manager HUD
NetworkReader

11、NetworkReader

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Your name Your email Suggestion *Submit suggestion

Cancel

NetworkReader 是一个用于从字节流中读取对象的 UNET 高级别 API 类。

此类在与 NetworkWriter 一起工作。NetworkReader 具有很多Unity类型特定的序列化功能。

12、NetworkServer

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Your name Your email Suggestion *Submit suggestion

Cancel

NetworkServer 是一个 UNET 高级别 API 类,管理来自多个client的连接。

Properties

Property: Function:
connections The set of active connections to remote clients.
localConnections The set of active connections to local clients.
handlers The set of registered message handler function.
objects The set of spawned objects with NetworkIdentities.
active True if the server is listening and running (static).
localActiveClient True if there is a local client in the same process; this server is a “Host”.
numChannels The number of configured NetworkTransport QoS channels.

13、NetworkStartPosition

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Your name Your email Suggestion *Submit suggestion

Cancel

NetworkStartPosition 被NetworkManager 使用,当创建player对象时。NetworkStartPosition的位置 和 旋转 用来放新创建的Player 对象。

14、NetworkTransform

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Your name Your email Suggestion *Submit suggestion

Cancel

NetworkTransform 组件通过网络同步movemen运动的游戏对象。此组件考虑权威,所以 LocalPlayer 对象 (当中有地方当局) 同步他们的 position 从client到server。然后出去给其它客户机。

其它对象 (与server授权机构) 同步他们从server到client的位置。

若要使用此组件,请将其加入到您想要同步运动的预制或游戏的对象。该组件要求游戏对象具有 NetworkIdentity。请注意。必须催生网络的对象来同步。

Properties

Property: Function:
transformSyncMode Which synchronization method to use for position.
sendInterval How often in seconds the object sends updates.
syncRotationAxis Which axis to use for rotation.
rotationSyncCompression What kind of compession to use for rotation.
syncSpin Flag to sync angular velocity.
movementTheshold The threshold to not send position updates.
snapThreshold The threshold to “pop” instead of interpolate.
interpolateRotation Factor to control rotation interpolation.
interpolateMovement Factor to control movement interpolation.

Hints

• NetworkTransform的inspector有一个 NetworkSendRate 滑块   。对于被创建后不须要更新 - 如子弹的对象,将此滑块设置为零。

15、NetworkTransformVisualizer

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Your name Your email Suggestion *Submit suggestion

Cancel

NetworkTransformVisualizer 是一个有用程序utility 组件。同意可视化的内嵌使用 NetworkTransform 组件的对象。

Properties

Property: Function:
VisualizerPrefab The prefab of an object to create to visualize the target position.

16、NetworkTransport

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Your name Your email Suggestion *Submit suggestion

Cancel

NetworkTransport 是 UNET 低级别 API 接口。它是一个静态的类。

17、NetworkWriter

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Your name Your email Suggestion *Submit suggestion

Cancel

NetworkWriter 是一个 UNET 高级别 API 类,用于将对象写入字节流。

此类在与 NetworkReader 一起工作。NetworkWriter 具有很多统一类型特定的序列化功能。

NetworWriter 与 MessageBase 类用于使包括序列化的网络消息的字节数组。

void SendMessage(short msgType, MessageBase msg, int channelId)
{// write the message to a local bufferNetworkWriter writer = new NetworkWriter();writer.StartMessage(msgType);msg.Serialize(writer);writer.FinishMessage();myClient.SendWriter(writer, channelId);
}

转载于:https://www.cnblogs.com/gccbuaa/p/6728111.html

Unity5.1 新的网络引擎UNET(十五) Networking 引用--下相关推荐

  1. Unity5.1 新的网络引擎UNET(十五) Networking 引用--中

    孙广东 2015.7.21 本节提供了与网络系统一起使用的组件的具体信息. 3.NetworkClient NetworkClient 是一个 HLAPI 类,管理网络连接到服务器 - - 相应着 U ...

  2. HTML5游戏引擎(十五)-时间控制——Timer计时器 Ticker心跳-startTick-stopTick 帧事件-ENTER_FRAME

    HTML5游戏引擎(十五)-时间控制--Timer计时器 & Ticker心跳-startTick-stopTick & 帧事件-ENTER_FRAME 时间控制 Timer计时器 假 ...

  3. 鸡兔同笼 需求:今有雉兔同笼,上有三十五头,下有九十四足,问雉兔各几何?

    /*需求:今有雉兔同笼,上有三十五头,下有九十四足,问雉兔各几何?*/ public class Test12 {public static void main(String[] args) {/*设 ...

  4. LiveVideoStackCon讲师热身分享 ( 十五 ) —— 教育场景下的实时音视频解决方案

    LiveVideoStackCon 2018音视频技术大会是每年的多媒体技术人的盛宴,为了让参会者与大会讲师更多互动交流,我们推出了LiveVideoStackCon讲师热身分享第一季,在每周四晚19 ...

  5. 28家中国域名商保有量统计:有孚网络升至第十五

    IDC评述网(idcps.com)12月23日报道:根据RegistrarStats公布的实时数据显示,截止至2015年12月19日,在国内域名注册市场上,阿里云(万网)以域名保有量4,995,257 ...

  6. 对抗生成网络学习(十五)——starGAN实现人脸属性修改(tensorflow实现)

    一.背景 最近事情比较多,一个多月没写CSDN了,最近打算做一做satrGAN. starGAN是Yunjey Choi等人于17年11月提出的一个模型[1].该模型可以实现人脸的属性修改,原理上来说 ...

  7. 一张图看懂阿里云网络产品【十五】IPv6 解决方案

    摘要:作为国内首家全面支持IPv6的云厂商,阿里云12月再次推出全栈IPv6解决方案,核心产品已全面支持,协助客户小时/天级即可完成IPv6 访问.方案成功历经优酷.淘宝.天猫.双十一考验.SLB I ...

  8. Android12之OpenSL ES中IObject_GetInterface获取引擎接口(十五)

    简介: CSDN博客专家,专注Android/Linux系统,分享多mic语音方案.音视频.编解码等技术,与大家一起成长! 优质专栏:Audio工程师进阶系列[原创干货持续更新中--]

  9. 【Leecode笔记】第十五周(下)(12.18-12.20)哈希表专题

    [12.18]-------------------------------------------- [第一题]只出现一次的数字 分析:不需要额外空间的方法,就往位运算上想. //异或 //执行用时 ...

最新文章

  1. linux cat 查看文件内容 不带#号的,Linux下如何不用cat命令读取文件内容
  2. nginx源码编译、负载均衡及模块的扩展
  3. 在一个有返回值的方法中,用block回传的解决方法
  4. CssVariables_01
  5. kvm虚拟机_通过QEMU-GuestAgent实现从外部注入写文件到KVM虚拟机内部
  6. 聊聊jvm的-XX:MaxDirectMemorySize
  7. linux 7 没有权限访问,[CentOS 7系列]文件或目录的权限与属性
  8. WordPress精美免费主题分享系列之新闻风格篇
  9. Java多线程学习十二:悲观锁和乐观锁的本质||
  10. Knowledge Integration Networks for Action Recognition AAAI 2020
  11. 灵玖软件:九眼智能文档核查云平台上线了
  12. MyBatis 批量插入与更新、核心配置文件 mybatis-config.xml
  13. Oracle 索引原理和种类
  14. 道路交通安全隐患排查的方法研究
  15. pyecharts画世界地图时显示为中文之世界各国中英文国名对照
  16. wustoj1296
  17. 微信第三方网页关闭当前页面回到微信对话窗口
  18. 全志H3停产,A40I/T3更胜一筹--CoM-X40I核心模块来了
  19. 微信小程序map展示
  20. 分享一个非常厉害的md5 解密网站

热门文章

  1. 开源 | CVPR 2021无需向量监督的矢量图生成算法
  2. 论文速递 | 华为开源自研算法Disout | 中科院计算所GCN中文综述
  3. Python编辑统一缩进(Pycharm)
  4. 计算机关机后耗电问题,不用拔电线 轻松设置解决电脑关机耗电
  5. IAI OpenLab工业人工智能开放实验室白皮书(一)
  6. 机器学习(十)Mean Shift 聚类算法
  7. html盒子模型子元素怎么水平占满父元素_前端面试常考问题之css盒模型
  8. c语言调用机器码,演示几种用C语言来执行shellcode(其实也就是机器码)的方式
  9. python3编程入门_python3编程基础之一:操作
  10. 【Gitlab】GIT回滚master分支到指定tag版本 并提交远程仓库