Version: 2017.3
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.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961