Table of Contents

Class NetworkBehaviour

Namespace
Netick.Unity
Assembly
Netick.Unity.dll
public abstract class NetworkBehaviour : NetickBehaviour, INetickNetworkScript, INetickScript
Inheritance
Object
Component
Behaviour
MonoBehaviour
NetworkBehaviour
Implements
Derived
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

NetworkBehaviour()

protected NetworkBehaviour()

Fields

S

public int* S

Field Value

int*

Properties

BehaviourId

The network id of this NetworkBehaviour.

public int BehaviourId { get; }

Property Value

int

Id

The network id of this object.

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

InputSourcePlayerId

public int InputSourcePlayerId { get; }

Property Value

int

IsClient

Returns true if this NetickEngine is a client.

public bool IsClient { get; }

Property Value

bool

IsInputSource

Returns true if this LocalPlayer is providing inputs to this Object.

public bool IsInputSource { get; }

Property Value

bool

IsOwner

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

public bool IsOwner { get; }

Property Value

bool

IsPredicted

On the client, it returns true only if the client is predicting this object. On the server, it always returns true.

public bool IsPredicted { 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

IsServer

Returns true if this NetickEngine is the server.

public bool IsServer { get; }

Property Value

bool

StateSize

Returns the networked state size of this behavior in bytes.

public int StateSize { get; }

Property Value

int

Methods

CopyStateTo(byte*)

public void CopyStateTo(byte* target)

Parameters

target byte*

FetchInput<T>(out T, out bool, int)

Fetches a network input for this tick. Returns false if no input source is currently providing inputs to this Object, or when input loss occurs (in case of a remote input source).

public bool FetchInput<T>(out T input, out bool isDuplicated, int index = 0) where T : unmanaged

Parameters

input T
isDuplicated bool
index int

Returns

bool

Type Parameters

T

FetchInput<T>(out T, int)

Fetches a network input for this tick. Returns false if no input source is currently providing inputs to this Object, or when input loss occurs (in case of a remote input source).

public bool FetchInput<T>(out T input, int index = 0) where T : unmanaged

Parameters

input T
index int

Returns

bool

Type Parameters

T

FindInterpolator(string)

public Interpolator FindInterpolator(string propertyName)

Parameters

propertyName string

Returns

Interpolator

GameEngineIntoNetcode()

public virtual void GameEngineIntoNetcode()

GetRef<T>()

public NetworkBehaviourRef<T> GetRef<T>() where T : NetworkBehaviour

Returns

NetworkBehaviourRef<T>

Type Parameters

T

InternalGetStateSizeWords()

public virtual int InternalGetStateSizeWords()

Returns

int

InternalInit()

public virtual void InternalInit()

InternalReset()

public virtual void InternalReset()

NetcodeIntoGameEngine()

public virtual void NetcodeIntoGameEngine()

NetworkAwake()

public virtual void NetworkAwake()

NetworkReset()

public virtual void NetworkReset()

OnBecameInterested()

public virtual void OnBecameInterested()

OnBecameUninterested()

public virtual void OnBecameUninterested()

OnInputSourceChanged(NetworkPlayer)

public virtual void OnInputSourceChanged(NetworkPlayer previous)

Parameters

previous NetworkPlayer

OnInputSourceLeft()

Called on the server when the input source of this Object has disconnected.

public virtual void OnInputSourceLeft()

OnSpawnPredictionSucceeded()

Called on the client when the server confirms that this object has been successfully spawn-predicted and therefore has a valid SceneLoadId.

public virtual void OnSpawnPredictionSucceeded()

SetStateFrom(byte*)

Sets the state of this behavior. Ignores [OnChanged] callbacks when setting the data.

public void SetStateFrom(byte* source)

Parameters

source byte*