Version: 2017.2
public void OnStartAuthority ();

描述

系统将针对基于上下文和 NetworkIdentity.localPlayerAuthority 而拥有权限的行为调用该方法。

该方法是在 OnStartServerOnStartClient 之后调用的。

在服务器上调用 NetworkIdentity.AssignClientAuthority 时,系统将在拥有该对象的客户端上调用该方法。 使用 NetworkServer.SpawnWithClientAuthority 生成对象时,系统将在拥有该对象的客户端上调用该方法。