Table of Contents

Class Network

Namespace
Netick
Assembly
Netick.dll
[HideInInspector]
[DisallowMultipleComponent]
public sealed class Network : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
Network
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
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.FindObjectOfType<T>()
Object.ToString()
Object.name
Object.hideFlags
Extension Methods

Properties

Instance

public static Network Instance { get; }

Property Value

Network

IsHeadless

public static bool IsHeadless { get; }

Property Value

bool

IsRunning

public static bool IsRunning { get; }

Property Value

bool

StartMode

public StartMode StartMode { get; }

Property Value

StartMode

Version

public static string Version { get; }

Property Value

string

Methods

Focus(NetworkSandbox)

Focus on a specific sandbox.

public static void Focus(NetworkSandbox sandbox)

Parameters

sandbox NetworkSandbox

The sandbox to focus on.

Init(NetworkTransport, NetickConfig, int)

Initializes Netick. This is automatically called when you start Netick.

If you don't provide a NetickConfig, Netick will use the default config, which can be modified/found in (Netick -> Settings).

If you don't provide a NetworkTransport, Netick will use the transport assigned in (Netick -> Settings -> Transport).

public static void Init(NetworkTransport transport = null, NetickConfig config = null, int sceneBuildIndex = -1)

Parameters

transport NetworkTransport
config NetickConfig
sceneBuildIndex int

Shutdown(bool)

Shuts down Netick and destroys all sandboxes. The shutdown will occur in the next frame. For immediate shutdown, use: ShutdownImmediately(bool)

public static void Shutdown(bool destroyAllNetworkObjects = false)

Parameters

destroyAllNetworkObjects bool

ShutdownImmediately(bool)

Shuts down Netick and destroys all sandboxes immediately.

public static void ShutdownImmediately(bool destroyAllNetworkObjects = false)

Parameters

destroyAllNetworkObjects bool

ShutdownSandbox(NetworkSandbox, bool)

Shuts down a specific sandbox.

public static void ShutdownSandbox(NetworkSandbox sandbox, bool destroyAllNetworkObjects = false)

Parameters

sandbox NetworkSandbox

The sandbox to shut down.

destroyAllNetworkObjects bool

StartAsClient(int, GameObject)

Starts Netick as a client.

public static NetworkSandbox StartAsClient(int port, GameObject prefab = null)

Parameters

port int
prefab GameObject

Returns

NetworkSandbox

The sandbox representing the client

StartAsServer(int, GameObject)

Starts Netick as a server.

public static NetworkSandbox StartAsServer(int port, GameObject prefab = null)

Parameters

port int

Network port.

prefab GameObject

Returns

NetworkSandbox

The sandbox representing the server

StartAsServerAndClient(int, GameObject, int)

Starts both a client (or clients) and a server.

public static Network.Sandboxs StartAsServerAndClient(int serverPort, GameObject prefab = null, int numOfClients = 1)

Parameters

serverPort int

Network port.

prefab GameObject
numOfClients int

Number of client sandboxs to create.

Returns

Network.Sandboxs