Class NetworkEventsListner
- Namespace
- Netick
- Assembly
- Netick.dll
public abstract class NetworkEventsListner : MonoBehaviour
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourNetworkEventsListner
- Derived
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.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.FindObjectOfType<T>()Object.ToString()Object.nameObject.hideFlags
- Extension Methods
Constructors
NetworkEventsListner()
protected NetworkEventsListner()
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)
Called on the server when a specific client has disconnected.
public virtual void OnClientDisconnected(NetworkSandbox sandbox, NetworkConnection client)
Parameters
sandbox
NetworkSandboxclient
NetworkConnection
OnClientSceneLoaded(NetworkSandbox, NetworkConnection)
Called on the server when a specific client finished loading the scene.
public virtual void OnClientSceneLoaded(NetworkSandbox sandbox, NetworkConnection client)
Parameters
sandbox
NetworkSandboxclient
NetworkConnection
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
OnDisconnectedFromServer(NetworkSandbox, NetworkConnection)
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)
Parameters
sandbox
NetworkSandboxserver
NetworkConnection
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
OnSceneLoadStarted(NetworkSandbox)
Called on both the client and the server before beginning to load the new scene.
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.
public virtual void OnSceneLoaded(NetworkSandbox sandbox)
Parameters
sandbox
NetworkSandbox
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
UnlinkFromNetick()
public void UnlinkFromNetick()