MonoBehaviour.OnDisconnectedFromServer(NetworkDisconnection)

Switch to Manual

Description

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

using UnityEngine;
using System.Collections;

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