Class BaseCollectionUpdateHelper
The base class to test rapidly adding items to a collection type
Inheritance
BaseCollectionUpdateHelper
Inherited Members
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
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)
Namespace: Unity.Netcode.RuntimeTests
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
public class BaseCollectionUpdateHelper : NetworkBehaviour
Fields
VerboseMode
Declaration
public static bool VerboseMode
Field Value
Type | Description |
---|---|
bool |
Properties
HelperState
Declaration
public BaseCollectionUpdateHelper.HelperStates HelperState { get; }
Property Value
Type | Description |
---|---|
BaseCollectionUpdateHelper.HelperStates |
Methods
AddItem()
Declaration
protected virtual void AddItem()
ChangeOwner()
Changes the ownership
Declaration
public ulong ChangeOwner()
Returns
Type | Description |
---|---|
ulong | next owner or ulong.MaxValue that means the authority did not invoke this method |
Clear()
Declaration
public void Clear()
Log(string)
Declaration
protected void Log(string msg)
Parameters
Type | Name | Description |
---|---|---|
string | msg |
OnClear()
Declaration
protected virtual void OnClear()
OnNetworkDespawn()
Gets called when the NetworkObject gets despawned. This method runs both client and server side.
Declaration
public override void OnNetworkDespawn()
Overrides
OnNetworkSpawn()
Gets called when the NetworkObject gets spawned, message handlers are ready to be registered, and the network is set up.
Declaration
public override void OnNetworkSpawn()
Overrides
OnOwnershipChanged(ulong, ulong)
Invoked on all clients. Override this method to be notified of any ownership changes (even if the instance was neither the previous or newly assigned current owner).
Declaration
protected override void OnOwnershipChanged(ulong previous, ulong current)
Parameters
Type | Name | Description |
---|---|---|
ulong | previous | the previous owner |
ulong | current | the current owner |
Overrides
OnValidateAgainst(BaseCollectionUpdateHelper)
Declaration
protected virtual bool OnValidateAgainst(BaseCollectionUpdateHelper otherHelper)
Parameters
Type | Name | Description |
---|---|---|
BaseCollectionUpdateHelper | otherHelper |
Returns
Type | Description |
---|---|
bool |
SetState(HelperStates)
Declaration
public void SetState(BaseCollectionUpdateHelper.HelperStates helperState)
Parameters
Type | Name | Description |
---|---|---|
BaseCollectionUpdateHelper.HelperStates | helperState |
ValidateAgainst(BaseCollectionUpdateHelper)
Declaration
public bool ValidateAgainst(BaseCollectionUpdateHelper otherHelper)
Parameters
Type | Name | Description |
---|---|---|
BaseCollectionUpdateHelper | otherHelper |
Returns
Type | Description |
---|---|
bool |