MonoBehaviour.OnDisconnectedFromServer(NetworkDisconnection)

切换到手册

描述

当连接丢失或与服务器断开连接时,在客户端上调用。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnDisconnectedFromServer(NetworkDisconnection info) { Debug.Log("Disconnected from server: " + info); } }