Version: 2017.2
protected void OnServerReconnectPlayer (Networking.NetworkConnection newConnection, GameObject oldPlayer, int oldConnectionId, short playerControllerId);
protected void OnServerReconnectPlayer (Networking.NetworkConnection newConnection, GameObject oldPlayer, int oldConnectionId, short playerControllerId, Networking.NetworkReader extraMessageReader);

パラメーター

newConnection 新しいクライアントの接続
oldPlayer クライアントに紐づくプレイヤーオブジェクト
oldConnectionId 旧ホスト上のクライアントの connectionId
playerControllerId 再接続するプレイヤーの playerControllerId
extraMessageReader 追加メッセージデータ (オプション)

説明

旧ホストのクライアントが新しいホストに再接続するときに、新しいホスト上で呼び出される仮想関数

この関数の基本クラスバージョンは ReconnectPlayerForConnection() を呼び出し、新しいクライアントを接続します。

ReconnectPlayerForConnection はこの関数の中で呼び出す必要はありません。それは、非同期的に行われます。

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