Class ChildObjectComponent
Helper component for NetworkTransform parenting tests
Inheritance
ChildObjectComponent
Inherited Members
NetworkBehaviour.__rpc_func_table
NetworkBehaviour.__rpc_name_table
NetworkBehaviour.__rpc_exec_stage
NetworkBehaviour.NetworkVariableFields
NetworkBehaviour.__getTypeName()
NetworkBehaviour.__createNativeList<T>()
NetworkBehaviour.__initializeVariables()
NetworkBehaviour.__initializeRpcs()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, InstantiateParameters)
Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Assembly: Unity.Netcode.RuntimeTests.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()
Declaration
public override void OnNetworkDespawn()
Overrides
OnNetworkObjectParentChanged(NetworkObject)
Declaration
public override void OnNetworkObjectParentChanged(NetworkObject parentNetworkObject)
Parameters
Overrides
OnNetworkSpawn()
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 |
Name |
Description |
| BufferSerializer<T> |
serializer |
The serializer used for reading or writing the state.
|
Type Parameters
| Name |
Description |
| T |
The type of the serializer.
|
Overrides
Reset()
Declaration
public static void Reset()