MonoBehaviour.OnFailedToConnect 当连接失败

function OnFailedToConnect (error : NetworkConnectionError) : void


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