MonoBehaviour.OnFailedToConnect 当连接失败

function OnFailedToConnect (error : NetworkConnectionError) : void

Description描述

Called on the client when a connection attempt fails for some reason.

当一个连接因为某些原因失败时在客户端调用。

The reason why it fails is passed in as a NetworkConnectionError enum.

失败原因将作为 NetworkConnectionError 枚举传入。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void OnFailedToConnect(NetworkConnectionError error) {
		Debug.Log("Could not connect to server: " + error);
	}
}
function OnFailedToConnect(error : NetworkConnectionError ) {
	Debug.Log ("Could not connect to server: "+ error);
}
Page last updated: 2011-1-2