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);
}