Network
- AllocateViewID
- CloseConnection
- connections
- connectionTesterIP
- connectionTesterPort
- Connect
- DestroyPlayerObjects
- Destroy
- Disconnect
- GetAveragePing
- GetLastPing
- HavePublicAddress
- incomingPassword
- InitializeSecurity
- InitializeServer
- Instantiate
- isClient
- isMessageQueueRunning
- isServer
- logLevel
- maxConnections
- minimumAllocatableViewIDs
- natFacilitatorIP
- natFacilitatorPort
- OnConnectedToServer
- OnDisconnectedFromServer
- OnFailedToConnectToM...
- OnFailedToConnect
- OnNetworkInstantiate
- OnPlayerConnected
- OnPlayerDisconnected
- OnSerializeNetworkView
- OnServerInitialized
- peerType
- player
- proxyIP
- proxyPassword
- proxyPort
- RemoveRPCsInGroup
- RemoveRPCs
- sendRate
- SetLevelPrefix
- SetReceivingEnabled
- SetSendingEnabled
- TestConnectionNAT
- TestConnection
- time
- useProxy
Network.OnFailedToConnectToMasterServer 当连接主服务器失败
function OnFailedToConnectToMasterServer (error : NetworkConnectionError) : void
Description描述
Called on clients or servers when there is a problem connecting to the master server.
当连接到主服务器(MasterServer)有问题时,从客户端或服务器调用这个函数。
The reason why it fails is passed in as a NetworkConnectionError enum.
失败的原因作为NetworkConnectionError枚举传入。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnFailedToConnectToMasterServer(NetworkConnectionError info) {
Debug.Log("Could not connect to master server: " + info);
}
}
function OnFailedToConnectToMasterServer(info : NetworkConnectionError) {
Debug.Log("Could not connect to master server: "+ info);
}
最后修改:2011年4月1日 Friday 21:27