Class NetworkEventsListener
public abstract class NetworkEventsListener : NetickBaseBehaviour
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourNetworkEventsListener
- Derived
- Inherited Members
-
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
NetworkEventsListener()
protected NetworkEventsListener()
Properties
Sandbox
public NetworkSandbox Sandbox { get; }
Property Value
Methods
OnClientConnected(NetworkSandbox, NetworkConnection)
Called on the server when a specific client has connected.
public virtual 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 virtual 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 virtual 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 virtual 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 virtual void OnConnectedToServer(NetworkSandbox sandbox, NetworkConnection server)
Parameters
sandbox
NetworkSandboxserver
NetworkConnection
OnDataReceived(NetworkSandbox, NetworkConnection, byte, byte*, int, TransportDeliveryMethod)
public virtual void OnDataReceived(NetworkSandbox sandbox, NetworkConnection sender, byte id, byte* data, int length, TransportDeliveryMethod transportDeliveryMethod)
Parameters
sandbox
NetworkSandboxsender
NetworkConnectionid
bytedata
byte*length
inttransportDeliveryMethod
TransportDeliveryMethod
OnDisconnectedFromServer(NetworkSandbox, NetworkConnection, TransportDisconnectReason)
Called on the client when connection to the server ended, or when a network error caused the disconnection.
public virtual void OnDisconnectedFromServer(NetworkSandbox sandbox, NetworkConnection server, TransportDisconnectReason transportDisconnectReason)
Parameters
sandbox
NetworkSandboxserver
NetworkConnectiontransportDisconnectReason
TransportDisconnectReason
OnInput(NetworkSandbox)
Called to read inputs.
public virtual void OnInput(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnMatchCreated(NetworkSandbox)
public virtual void OnMatchCreated(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnMatchListUpdate(NetworkSandbox, List<Session>)
public virtual void OnMatchListUpdate(NetworkSandbox sandbox, List<Session> sessions)
Parameters
sandbox
NetworkSandboxsessions
List<Session>
OnObjectCreated(NetworkObject)
Called when a network object has been created/initialized.
public virtual void OnObjectCreated(NetworkObject entity)
Parameters
entity
NetworkObject
OnObjectDestroyed(NetworkObject)
Called when a network object has been destroyed/recycled.
public virtual void OnObjectDestroyed(NetworkObject entity)
Parameters
entity
NetworkObject
OnPlayerConnected(NetworkSandbox, NetworkPlayer)
Called on the server when a specific player has connected.
public virtual void OnPlayerConnected(NetworkSandbox sandbox, NetworkPlayer player)
Parameters
sandbox
NetworkSandboxplayer
NetworkPlayer
OnPlayerDisconnected(NetworkSandbox, NetworkPlayer, TransportDisconnectReason)
Called on the server when a specific player has disconnected.
public virtual void OnPlayerDisconnected(NetworkSandbox sandbox, NetworkPlayer player, TransportDisconnectReason transportDisconnectReason)
Parameters
sandbox
NetworkSandboxplayer
NetworkPlayertransportDisconnectReason
TransportDisconnectReason
OnSceneLoadStarted(NetworkSandbox)
Called on both the client and the server before beginning to load the new scene.
[Obsolete("This method will be removed. Use OnSceneLoadDone instead.")]
public virtual void OnSceneLoadStarted(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnSceneLoaded(NetworkSandbox)
Called on both the client and the server when the scene has been loaded.
[Obsolete("This method will be removed. Use OnSceneLoadBegan instead.")]
public virtual void OnSceneLoaded(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnSceneOperationBegan(NetworkSandbox, NetworkSceneOperation)
Called on both the client and the server when a scene load/unload operation was started.
public virtual void OnSceneOperationBegan(NetworkSandbox sandbox, NetworkSceneOperation sceneOperation)
Parameters
sandbox
NetworkSandboxsceneOperation
NetworkSceneOperation
OnSceneOperationDone(NetworkSandbox, NetworkSceneOperation)
Called on both the client and the server when a scene load/unload operation finished.
public virtual void OnSceneOperationDone(NetworkSandbox sandbox, NetworkSceneOperation sceneOperation)
Parameters
sandbox
NetworkSandboxsceneOperation
NetworkSceneOperation
OnShutdown(NetworkSandbox)
Called when Netick has been shut down.
public virtual void OnShutdown(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnStartup(NetworkSandbox)
Called when Netick has been started.
public virtual void OnStartup(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
OnVisibilityChanged(NetworkSandbox)
Called when a sandbox visibility changes. Use Sandbox.IsVisible to find if the sandbox is visible or not.
public virtual void OnVisibilityChanged(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
UnlinkFromNetick()
public void UnlinkFromNetick()