Table of Contents

Class NetworkObject

Namespace
Netick
Assembly
Netick.Unity.dll
public class NetworkObject : MonoBehaviour, INetickEntity
Inheritance
Object
Component
Behaviour
MonoBehaviour
NetworkObject
Implements
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

NetworkObject()

public NetworkObject()

Fields

UseAoI

public bool UseAoI

Field Value

bool

Properties

Engine

public NetickEngine Engine { get; }

Property Value

NetickEngine

Entity

public Entity Entity { get; }

Property Value

Entity

HasValidId

Returns true if this NetworkObject has been added to the simulation by Netick, and thus has a valid id.

[SerializeField]
public bool HasValidId { get; }

Property Value

bool

Id

public int Id { get; }

Property Value

int

InputSource

Returns the source NetworkPlayer (NetworkPeer/ServerConnection) of inputs for this NetworkObject. If the source of inputs is remote (from a client) it returns that ServerConnection, while on the input source itself it returns the local NetworkPlayer.

public NetworkPlayer InputSource { get; set; }

Property Value

NetworkPlayer

IsClient

Returns true if this Engine is a client.

public bool IsClient { get; }

Property Value

bool

IsInputSource

Returns true if this LocalPlayer is providing inputs for this NetworkObject.

public bool IsInputSource { get; }

Property Value

bool

IsOwner

Returns true if this Engine is the owner of this Object. In this version of Netick: Server=Owner.

public bool IsOwner { get; }

Property Value

bool

IsPrefab

public bool IsPrefab { get; }

Property Value

bool

IsPrefabObject

public bool IsPrefabObject { get; }

Property Value

bool

IsProxy

Returns true if we neither provide inputs nor own this object.

public bool IsProxy { get; }

Property Value

bool

IsResimulating

Returns true if we are currently resimulating a previous input of the past. On the server, it always returns false since only the clients resimulate.

public bool IsResimulating { get; }

Property Value

bool

IsSceneObject

[SerializeField]
public bool IsSceneObject { get; }

Property Value

bool

IsServer

Returns true if this Engine is the server.

public bool IsServer { get; }

Property Value

bool

IsSpawnPredicted

public bool IsSpawnPredicted { get; }

Property Value

bool

Parent

The NetworkObject parent of this object.

public NetworkObject Parent { get; }

Property Value

NetworkObject

PredictionMode

public Relevancy PredictionMode { get; }

Property Value

Relevancy

Sandbox

public NetworkSandbox Sandbox { get; }

Property Value

NetworkSandbox

SpawnPredictionKey

public SpawnPredictionKey SpawnPredictionKey { get; }

Property Value

SpawnPredictionKey

SpawnTick

The tick which this object was spawned at.

public Tick SpawnTick { get; }

Property Value

Tick

Methods

GetBehaviourById<T>(int)

public T GetBehaviourById<T>(int id) where T : NetworkBehaviour

Parameters

id int

Returns

T

Type Parameters

T

GetBehaviour<T>()

public T GetBehaviour<T>() where T : NetworkBehaviour

Returns

T

Type Parameters

T

GetSceneId()

public int GetSceneId()

Returns

int

Initialize(NetickEngine, Entity)

Used to initialize the user entity and assign Engine and Entity

public void Initialize(NetickEngine sandbox, Entity entity)

Parameters

sandbox NetickEngine
entity Entity

SetParent(NetworkObject)

[Owner/InputSource Only] Changes the parent of this object.

public void SetParent(NetworkObject obj)

Parameters

obj NetworkObject

The object which will become the parent of this object.