Class NetworkEvents
[AddComponentMenu("Netick/Network Events")]
[Obsolete("This component will be removed in the future.")]
public class NetworkEvents : NetworkEventsListener
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourNetworkEvents
- Inherited Members
-
NetworkEventsListener.OnPlayerDisconnected(NetworkSandbox, NetworkPlayer, TransportDisconnectReason)MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.destroyCancellationTokenMonoBehaviour.useGUILayoutMonoBehaviour.runInEditModeBehaviour.enabledBehaviour.isActiveAndEnabledComponent.GetComponent<T>()Component.TryGetComponent<T>(out T)Component.GetComponentInChildren<T>()Component.GetComponentsInChildren<T>()Component.GetComponentInParent<T>()Component.GetComponentsInParent<T>()Component.GetComponents<T>()Component.transformComponent.gameObjectComponent.tagObject.GetInstanceID()Object.GetHashCode()Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
- Extension Methods
Constructors
NetworkEvents()
public NetworkEvents()
Fields
onClientConnected
public NetworkEvents.OnClientConnectedEvent onClientConnected
Field Value
onClientDisconnected
public NetworkEvents.OnClientDisconnectedEvent onClientDisconnected
Field Value
onConnectFailedEvent
public NetworkEvents.OnConnectFailedEvent onConnectFailedEvent
Field Value
onConnectRequest
public NetworkEvents.OnConnectRequestEvent onConnectRequest
Field Value
onConnectedToServer
public NetworkEvents.OnConnectedToServerEvent onConnectedToServer
Field Value
onDisconnectedFromServer
public NetworkEvents.OnDisconnectedFromServerEvent onDisconnectedFromServer
Field Value
onInput
public NetworkEvents.OnInputEvent onInput
Field Value
onMatchCreated
public NetworkEvents.OnMatchCreatedEvent onMatchCreated
Field Value
onMatchList
public NetworkEvents.OnMatchListUpdateEvent onMatchList
Field Value
onObjectCreated
public NetworkEvents.OnObjectCreatedEvent onObjectCreated
Field Value
onObjectDestroyed
public NetworkEvents.OnObjectDestroyedEvent onObjectDestroyed
Field Value
onSceneLoadStarted
public NetworkEvents.OnSceneLoadStartedEvent onSceneLoadStarted
Field Value
onSceneLoaded
public NetworkEvents.OnSceneLoadedEvent onSceneLoaded
Field Value
onShutdown
public NetworkEvents.OnShutdownEvent onShutdown
Field Value
onStartup
public NetworkEvents.OnStartupEvent onStartup
Field Value
Methods
OnClientConnected(NetworkSandbox, NetworkConnection)
Called on the server when a specific client has connected.
public override void OnClientConnected(NetworkSandbox sandbox, NetworkConnection client)
Parameters
sandbox
NetworkSandboxclient
NetworkConnection
OnClientDisconnected(NetworkSandbox, NetworkConnection, TransportDisconnectReason)
Called on the server when a specific client has disconnected.
public override void OnClientDisconnected(NetworkSandbox sandbox, NetworkConnection client, TransportDisconnectReason transportDisconnectReason)
Parameters
sandbox
NetworkSandboxclient
NetworkConnectiontransportDisconnectReason
TransportDisconnectReason
OnConnectFailed(NetworkSandbox, ConnectionFailedReason)
Called on the client when the connection to the server was refused, or simply failed.
public override void OnConnectFailed(NetworkSandbox sandbox, ConnectionFailedReason reason)
Parameters
sandbox
NetworkSandboxreason
ConnectionFailedReason
OnConnectRequest(NetworkSandbox, NetworkConnectionRequest)
Called on the server when a client tries to connect. Use request
to decide whether or not to allow this client to connect.
public override void OnConnectRequest(NetworkSandbox sandbox, NetworkConnectionRequest request)
Parameters
sandbox
NetworkSandboxrequest
NetworkConnectionRequest
OnConnectedToServer(NetworkSandbox, NetworkConnection)
Called on the client when connection to the server has been initiated.
public override void OnConnectedToServer(NetworkSandbox sandbox, NetworkConnection server)
Parameters
sandbox
NetworkSandboxserver
NetworkConnection
OnDisconnectedFromServer(NetworkSandbox, NetworkConnection, TransportDisconnectReason)
Called on the client when connection to the server ended, or when a network error caused the disconnection.
public override void OnDisconnectedFromServer(NetworkSandbox sandbox, NetworkConnection server, TransportDisconnectReason transportDisconnectReason)
Parameters
sandbox
NetworkSandboxserver
NetworkConnectiontransportDisconnectReason
TransportDisconnectReason
OnInput(NetworkSandbox)
Called to read inputs.
public override void OnInput(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnMatchCreated(NetworkSandbox)
public override void OnMatchCreated(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnMatchListUpdate(NetworkSandbox, List<Session>)
public override void OnMatchListUpdate(NetworkSandbox sandbox, List<Session> sessions)
Parameters
sandbox
NetworkSandboxsessions
List<Session>
OnObjectCreated(NetworkObject)
Called when a network object has been created/initialized.
public override void OnObjectCreated(NetworkObject obj)
Parameters
obj
NetworkObject
OnObjectDestroyed(NetworkObject)
Called when a network object has been destroyed/recycled.
public override void OnObjectDestroyed(NetworkObject obj)
Parameters
obj
NetworkObject
OnSceneLoadStarted(NetworkSandbox)
Called on both the client and the server before beginning to load the new scene.
public override void OnSceneLoadStarted(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnSceneLoaded(NetworkSandbox)
Called on both the client and the server when the scene has been loaded.
public override void OnSceneLoaded(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnShutdown(NetworkSandbox)
Called when Netick has been shut down.
public override void OnShutdown(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnStartup(NetworkSandbox)
Called when Netick has been started.
public override void OnStartup(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox