Table of Contents

Class NetworkEvents

Namespace
Netick.Unity
Assembly
Netick.Unity.dll
[AddComponentMenu("Netick/Network Events")]
[Obsolete("This component will be removed in the future.")]
public class NetworkEvents : NetworkEventsListener
Inheritance
Object
Component
Behaviour
MonoBehaviour
NetworkEvents
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.transform
Component.gameObject
Component.tag
Object.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.name
Object.hideFlags
Extension Methods

Constructors

NetworkEvents()

public NetworkEvents()

Fields

onClientConnected

public NetworkEvents.OnClientConnectedEvent onClientConnected

Field Value

NetworkEvents.OnClientConnectedEvent

onClientDisconnected

public NetworkEvents.OnClientDisconnectedEvent onClientDisconnected

Field Value

NetworkEvents.OnClientDisconnectedEvent

onConnectFailedEvent

public NetworkEvents.OnConnectFailedEvent onConnectFailedEvent

Field Value

NetworkEvents.OnConnectFailedEvent

onConnectRequest

public NetworkEvents.OnConnectRequestEvent onConnectRequest

Field Value

NetworkEvents.OnConnectRequestEvent

onConnectedToServer

public NetworkEvents.OnConnectedToServerEvent onConnectedToServer

Field Value

NetworkEvents.OnConnectedToServerEvent

onDisconnectedFromServer

public NetworkEvents.OnDisconnectedFromServerEvent onDisconnectedFromServer

Field Value

NetworkEvents.OnDisconnectedFromServerEvent

onInput

public NetworkEvents.OnInputEvent onInput

Field Value

NetworkEvents.OnInputEvent

onMatchCreated

public NetworkEvents.OnMatchCreatedEvent onMatchCreated

Field Value

NetworkEvents.OnMatchCreatedEvent

onMatchList

public NetworkEvents.OnMatchListUpdateEvent onMatchList

Field Value

NetworkEvents.OnMatchListUpdateEvent

onObjectCreated

public NetworkEvents.OnObjectCreatedEvent onObjectCreated

Field Value

NetworkEvents.OnObjectCreatedEvent

onObjectDestroyed

public NetworkEvents.OnObjectDestroyedEvent onObjectDestroyed

Field Value

NetworkEvents.OnObjectDestroyedEvent

onSceneLoadStarted

public NetworkEvents.OnSceneLoadStartedEvent onSceneLoadStarted

Field Value

NetworkEvents.OnSceneLoadStartedEvent

onSceneLoaded

public NetworkEvents.OnSceneLoadedEvent onSceneLoaded

Field Value

NetworkEvents.OnSceneLoadedEvent

onShutdown

public NetworkEvents.OnShutdownEvent onShutdown

Field Value

NetworkEvents.OnShutdownEvent

onStartup

public NetworkEvents.OnStartupEvent onStartup

Field Value

NetworkEvents.OnStartupEvent

Methods

OnClientConnected(NetworkSandbox, NetworkConnection)

Called on the server when a specific client has connected.

public override void OnClientConnected(NetworkSandbox sandbox, NetworkConnection client)

Parameters

sandbox NetworkSandbox
client 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 NetworkSandbox
client NetworkConnection
transportDisconnectReason 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 NetworkSandbox
reason 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 NetworkSandbox
request 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 NetworkSandbox
server 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 NetworkSandbox
server NetworkConnection
transportDisconnectReason 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 NetworkSandbox
sessions 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