Netick.NetworkObject Class Reference
Inheritance diagram for Netick.NetworkObject:

Public Member Functions

int GetSceneId ()
 
void SetParent (NetworkObject obj)
 
GetBehaviour< T > (int id)
 
void PermitInput (NetworkPlayer source)
 
void RevokeInput ()
 

Properties

NetworkSandbox Sandbox [get]
 
int Id = -1 [get]
 
bool HasValidId [get]
 
bool IsSceneObject [get]
 
bool IsPrefabObject [get]
 
NetworkObject Parent [get]
 
NetworkPlayer InputSource [get, set]
 
bool IsProxy [get]
 
bool IsOwner [get]
 
bool IsInputSource [get]
 
bool IsResimulating [get]
 
Relevancy PredictionMode [get]
 
int GetUpdateFactor [get]
 

Detailed Description

Any GameObject which needs to be synced/replicated must have Network Object component. It’s the component that tells Netick a GameObject is networked. Although not every child GameObject needs it, only the root has to have a Network Object.

Member Function Documentation

◆ GetBehaviour< T >()

T Netick.NetworkObject.GetBehaviour< T > ( int  id)
Type Constraints
T :NetworkBehaviour 

◆ GetSceneId()

int Netick.NetworkObject.GetSceneId ( )

◆ PermitInput()

void Netick.NetworkObject.PermitInput ( NetworkPlayer  source)

[Owner Only] Permit source to provide inputs to this object.

Parameters
sourceThe player to be given permission.

◆ RevokeInput()

void Netick.NetworkObject.RevokeInput ( )

[Owner Only] Removes the current Input Source (InputSource) of this object.

◆ SetParent()

void Netick.NetworkObject.SetParent ( NetworkObject  obj)

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

Parameters
objThe object which will become the parent of this object.

Property Documentation

◆ GetUpdateFactor

int Netick.NetworkObject.GetUpdateFactor
get

◆ HasValidId

bool Netick.NetworkObject.HasValidId
get

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

◆ Id

int Netick.NetworkObject.Id = -1
get

The network id of this NetworkObject.

◆ InputSource

NetworkPlayer Netick.NetworkObject.InputSource
getset

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.

◆ IsInputSource

bool Netick.NetworkObject.IsInputSource
get

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

◆ IsOwner

bool Netick.NetworkObject.IsOwner
get

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

◆ IsPrefabObject

bool Netick.NetworkObject.IsPrefabObject
get

◆ IsProxy

bool Netick.NetworkObject.IsProxy
get

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

◆ IsResimulating

bool Netick.NetworkObject.IsResimulating
get

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.

◆ IsSceneObject

bool Netick.NetworkObject.IsSceneObject
get

◆ Parent

NetworkObject Netick.NetworkObject.Parent
get

The NetworkObject parent of this object.

◆ PredictionMode

Relevancy Netick.NetworkObject.PredictionMode
get

◆ Sandbox

NetworkSandbox Netick.NetworkObject.Sandbox
get

The NetworkSandbox containing this NetworkObject.