Network.SetLevelPrefix 设置关卡前缀

static function SetLevelPrefix (prefix : int) : void

Description描述

Set the level prefix which will then be prefixed to all network ViewID numbers.

设置关卡前缀,然后所有网络ViewID数都会使用该前缀。

This offers protection to prevent old network updates from straying from into a new level from the previous level. This can be set to any number and then incremented with each new level load. This doesn't add overhead to network traffic but just diminishes the pool of network ViewID numbers a little bit. The Network level loading page has an example of how to use this function.

此处提供了一些保护,可以防止来自前一个关卡的旧网络更新影响新的关卡。此处可以设置为任何数字并随着新关卡的加载而增加。这不会带来额外的网络负担,只会稍微减小网络ViewID池。看手册Network level loading的例子,怎样使用该函数。
最后修改:2011年4月4日 Monday 16:33

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。