MonoBehaviour.OnFailedToConnect(NetworkConnectionError)

Switch to Manual

Description

出于某种原因连接尝试失败时,在客户端上调用。

失败的原因会以 NetworkConnectionError 枚举的形式传入。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnFailedToConnect(NetworkConnectionError error) { Debug.Log("Could not connect to server: " + error); } }