Unity3D 网络部分中文翻译-Networking Elements in Unity.doc

Unity3D 网络部分中文翻译-Networking Elements in Unity.doc

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Unity3D 网络部分中文翻译-Networking Elements in Unity

Networking Elements in Unity 网络元素在Unity中 Unitys native networking supports everything discussed on the previous page. Server creation and client connection, sharing data between connected clients, determining which player controls which objects, and punching through network configuration variations are all supported out of the box. This page will walk you through the Unity-specific implementation of these networking practices. Unity的原生网络支持前面页面导论的每一个东西。服务器的创建和客户端的连接,分享数据在连接的客户端,决定哪一个player控制哪一个物体,并且穿透网络配置变化被支持并且开源。这一页引导你这些网络行为的Unity的具体的处理。 Creating a Server 创建一个服务器 Before you can begin playing a networked game, you have to determine the different computers you will be communicating with. To do this, you have to create a server. This can be a machine that is also running the game or it can be a dedicated machine that is not participating in the game. To create the server, you simply call Network.InitializeServer() from a script. When you want to connect to an existing server as a client, you call Network.Connect() instead. 在你开始玩一个网络游戏的之前,你必须去决定你将要与哪些不同的计算机进行交流。为了这个,我们必须去创建一个服务器。这个可以是一个机器他也运行这个游戏或者它可以是一个专用的机器他不参与在游戏里面。为了创建服务器,我们简单的调用Network.InitializeServer()在一个脚本。当你想要去连接一个存在的服务器作为一个客户端,你调用Network.Connect(). In general, you will find it very useful to familiarize yourself with the entire Network class. 总之,你将会发现它非常的有用对你熟悉全部的Network class.(网络类) Communicating using Network Views 通信用Network Views The Network View is a Component that sends data across the network. Network Views make your GameObject capable of sending data using RPC calls or State Synchronization. The way you use Network Views will determine how your games networking behaviors will work. Network Views have few options, but they are incredibly important for your networked game. Network View是一个通过网络发送数据的组件。Network Views使你的GameObject 能够发送数据使用RPC(远程程序调用)或者转台同步。你使用Network Views 这种方式将决定你的游戏网络行为能够工作。Network Views有很少的设置,但是他们对于你的网络游戏是十分的重要的。 For more information on using Network Views, please read the Network View Gu

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档