Class BaseCollectionUpdateHelper
The base class to test rapidly adding items to a collection type
Inheritance
BaseCollectionUpdateHelper
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)
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
public 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(bool)
Clears the underlying list state. Use force to force the isDirty check
Declaration
public void Clear(bool force = false)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | force | Value passed into the CheckDirtyState(bool) call after clearing the list. |
Log(string)
Declaration
protected void Log(string msg)
Parameters
| Type | Name | Description |
|---|---|---|
| string | msg |
OnClear(bool)
Declaration
protected virtual void OnClear(bool force)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | force |
OnNetworkDespawn()
Declaration
public override void OnNetworkDespawn()
Overrides
OnNetworkSpawn()
Declaration
public override void OnNetworkSpawn()
Overrides
OnOwnershipChanged(ulong, ulong)
Declaration
protected override void OnOwnershipChanged(ulong previous, ulong current)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | previous | |
| ulong | current |
Overrides
OnValidateAgainst(BaseCollectionUpdateHelper)
Declaration
protected virtual bool OnValidateAgainst(BaseCollectionUpdateHelper otherHelper)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseCollectionUpdateHelper | otherHelper |
Returns
| Type | Description |
|---|---|
| bool |
OnValueChangedCount()
Declaration
public virtual int OnValueChangedCount()
Returns
| Type | Description |
|---|---|
| int |
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 |