MonoBehaviour
- Awake
- CancelInvoke
- FixedUpdate
- InvokeRepeating
- Invoke
- IsInvoking
- LateUpdate
- OnApplicationFocus
- OnApplicationPause
- OnApplicationQuit
- OnBecameInvisible
- OnBecameVisible
- OnCollisionEnter
- OnCollisionExit
- OnCollisionStay
- OnConnectedToServer
- OnControllerColliderHit
- OnDestroy
- OnDisable
- OnDisconnectedFromServer
- OnDrawGizmosSelected
- OnDrawGizmos
- OnEnable
- OnFailedToConnectToM...
- OnFailedToConnect
- OnGUI
- OnJointBreak
- OnLevelWasLoaded
- OnMasterServerEvent
- OnMouseDown
- OnMouseDrag
- OnMouseEnter
- OnMouseExit
- OnMouseOver
- OnMouseUpAsButton
- OnMouseUp
- OnNetworkInstantiate
- OnParticleCollision
- OnPlayerConnected
- OnPlayerDisconnected
- OnPostRender
- OnPreCull
- OnPreRender
- OnRenderImage
- OnRenderObject
- OnSerializeNetworkView
- OnServerInitialized
- OnTriggerEnter
- OnTriggerExit
- OnTriggerStay
- OnWillRenderObject
- Reset
- StartCoroutine
- Start
- StopAllCoroutines
- StopCoroutine
- Update
- useGUILayout
MonoBehaviour.OnDisconnectedFromServer 当从服务器断开连接
function OnDisconnectedFromServer (mode : NetworkDisconnection) : void
Description描述
Called on the client when the connection was lost or you disconnected from the server.
当失去连接或从服务器端断开时在客户端调用。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnDisconnectedFromServer(NetworkDisconnection info) {
Debug.Log("Disconnected from server: " + info);
}
}
function OnDisconnectedFromServer (info : NetworkDisconnection) {
Debug.Log("Disconnected from server: " + info);
}
最后修改:2011年1月2日 Sunday 18:36