![]() |
Public Member Functions | |
virtual void | NetworkReset () |
virtual void | OnInputPermitted () |
virtual void | OnInputRevoked () |
virtual void | OnInputSourceLeft () |
virtual void | ApplyToBehaviour () |
virtual void | ApplyToComponent () |
virtual void | BeforeSetup () |
bool | FetchInput< T > (out T input) |
Interpolator< T > | FindInterpolator< T > (int id) |
bool | CanSend (RpcPeers source, RpcPeers target) |
bool | CanInvoke (RpcPeers source, RpcPeers target, bool localInvoke) |
virtual void | InitProperties () |
void | AddArray (nArray array) |
NetworkVariable | AddProperty (NetworkVariable property, bool isInterpolated, bool isPredicted) |
![]() | |
virtual void | NetworkStart () |
virtual void | NetworkDestroy () |
virtual void | NetworkUpdate () |
virtual void | NetworkRender () |
virtual void | NetworkFixedUpdate () |
Properties | |
int | Id [get] |
bool | IsClient [get] |
bool | IsServer [get] |
bool | IsOwner [get] |
bool | IsInputSource [get] |
bool | IsProxy [get] |
bool | IsResimulating [get] |
NetworkPlayer | InputSource [get] |
float | UpdatePeriod [get] |
virtual int | UpdateFactor [get] |
![]() | |
NetworkSandbox | Sandbox [get, set] |
NetworkObject | Object [get, set] |
Network Behaviour is the base class for all behaviours that need to be networked.
void Netick.NetworkBehaviour.AddArray | ( | nArray | array | ) |
Internal method. Never call this.
NetworkVariable Netick.NetworkBehaviour.AddProperty | ( | NetworkVariable | property, |
bool | isInterpolated, | ||
bool | isPredicted | ||
) |
Internal method. Never call this.
|
virtual |
Overrides this to apply the Unity's component state into the network state (network properties) of this NetworkBehaviour.
Reimplemented in Netick.NetworkAnimator, Netick.NetworkRigidbody, Netick.NetworkRigidbody2D, and Netick.NetworkTransform.
|
virtual |
Overrides this to apply the network state (network properties) of this NetworkBehaviour into the Unity's component state.
Reimplemented in Netick.NetworkAnimator, Netick.NetworkRigidbody, Netick.NetworkRigidbody2D, and Netick.NetworkTransform.
|
virtual |
Reimplemented in Netick.NetworkAnimator, Netick.NetworkRigidbody, Netick.NetworkRigidbody2D, and Netick.NetworkTransform.
Internal method. Never call this.
Internal method. Never call this.
bool Netick.NetworkBehaviour.FetchInput< T > | ( | out T | input | ) |
Fetchs a NetworkInput 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).
T | : | NetworkInput |
Interpolator< T > Netick.NetworkBehaviour.FindInterpolator< T > | ( | int | id | ) |
Finds a property interpolator by Id. You should call this in NetworkStart, and store your interpolator in a variable - because calling this repeatedly is slow.
T | Property type |
id | Interpolator id |
T | : | struct |
|
virtual |
Internal method. Never call this.
|
virtual |
Called when this Object (which's part of a networked prefab) has been recycled. It's used to reset the state of networked prefabs for reuse later. Make sure to reset the object correctly.
Note: all network properties are auto-rest to their declaration value by Netick. Therefore, you only need to rest non-networked fields which need to be rest.
Note: this is only called if pooling is activated for this prefab.
|
virtual |
Called when this NetworkSandbox.LocalPlayer has been granted permission to provide inputs to this Object.
|
virtual |
Called when this NetworkSandbox.LocalPlayer has been revoked from providing inputs to this Object.
|
virtual |
Called on the server when the input source of this Object has disconnected.
|
get |
The network id of this NetworkBehaviour.
|
get |
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.
|
get |
Returns true if this Sandbox is a client.
|
get |
Returns true if this NetworkSandbox.LocalPlayer is providing inputs to this Object.
|
get |
|
get |
Returns true if we neither provide inputs nor own this Object.
|
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.
|
get |
Returns true if this Sandbox is the server.
|
get |
|
get |