Version: 5.6
public bool AssignClientAuthority (Networking.NetworkConnection conn);

パラメーター

conn 権限を割り当てるクライアントの接続

戻り値

bool 権限が割り当てられている場合、 True 。

説明

クライアントの NetworkConnection を通じてクライアントにオブジェクトのコントロールを割り当てられます。

これによりオブジェクトを所有するクライアントに設定する hasAuthority 。 NetworkBehaviour.OnStartAuthority はそのクライアントで呼び出されます。このオブジェクトは接続の NetworkConnection.clientOwnedObjects リストになります。

Authority can be removed with RemoveClientAuthority. Only one client can own an object at any time. Only NetworkIdentities with localPlayerAuthority set can have client authority assigned. This does not need to be called for player objects, as their authority is setup automatically.