Class ChildObjectComponent
Helper component for NetworkTransform parenting tests
Inheritance
ChildObjectComponent
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Assembly: solution.dll
Syntax
public class ChildObjectComponent : NetworkTransform
Fields
ClientInstances
Declaration
public static readonly Dictionary<ulong, NetworkObject> ClientInstances
Field Value
ClientSubChildInstances
Declaration
public static readonly Dictionary<ulong, NetworkObject> ClientSubChildInstances
Field Value
EnableChildLog
Declaration
public static bool EnableChildLog
Field Value
HasSubChild
Declaration
public static bool HasSubChild
Field Value
Instances
Declaration
public static readonly List<ChildObjectComponent> Instances
Field Value
InstancesWithLogging
Declaration
public static readonly List<ChildObjectComponent> InstancesWithLogging
Field Value
ServerAuthority
Declaration
public bool ServerAuthority
Field Value
SubInstances
Declaration
public static readonly List<ChildObjectComponent> SubInstances
Field Value
TestCount
Declaration
public static int TestCount
Field Value
Properties
AuthorityInstance
Declaration
public static ChildObjectComponent AuthorityInstance { get; }
Property Value
AuthoritySubInstance
Declaration
public static ChildObjectComponent AuthoritySubInstance { get; }
Property Value
Methods
IsSubChild()
Declaration
protected virtual bool IsSubChild()
Returns
Invoked just prior to being pushed to non-authority instances.
Declaration
protected override void OnAuthorityPushTransformState(ref NetworkTransform.NetworkTransformState networkTransformState)
Parameters
Overrides
OnIsServerAuthoritative()
Override this method and return false to switch to owner authoritative mode
Declaration
protected override bool OnIsServerAuthoritative()
Returns
Type |
Description |
bool |
(true or false) where when false it runs as owner-client authoritative
|
Overrides
OnNetworkDespawn()
Gets called when the NetworkObject gets despawned. Is called both on the server and clients.
Declaration
public override void OnNetworkDespawn()
Overrides
OnNetworkObjectParentChanged(NetworkObject)
Gets called when the parent NetworkObject of this NetworkBehaviour's NetworkObject has changed
Declaration
public override void OnNetworkObjectParentChanged(NetworkObject parentNetworkObject)
Parameters
Overrides
OnNetworkSpawn()
Gets called when the NetworkObject gets spawned, message handlers are ready to be registered and the network is setup.
Declaration
public override void OnNetworkSpawn()
Overrides
Invoked on the non-authoritative side when the NetworkTransformState has been updated
Declaration
protected override void OnNetworkTransformStateUpdated(ref NetworkTransform.NetworkTransformState oldState, ref NetworkTransform.NetworkTransformState newState)
Parameters
Overrides
OnSynchronize<T>(ref BufferSerializer<T>)
This is invoked when a new client joins (server and client sides)
Server Side: Serializes as if we were teleporting (everything is sent via NetworkTransformState)
Client Side: Adds the interpolated state which applies the NetworkTransformState as well
Declaration
protected override void OnSynchronize<T>(ref BufferSerializer<T> serializer) where T : IReaderWriter
Parameters
Type Parameters
Overrides
Reset()
Declaration
public static void Reset()