Class NetworkVariableCollectionsTests
Validates using managed collections with NetworkVariable.
Managed Collections Tested:
- List
- Dictionary
- HashSet
This also does some testing on nested collections, but does
not test every possible combination.
Inheritance
NetworkVariableCollectionsTests
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
[TestFixture(new object[] { NetcodeIntegrationTest.HostOrServer.Host, NetworkVariableCollectionsTests.CollectionTypes.List })]
[TestFixture(new object[] { NetcodeIntegrationTest.HostOrServer.Server, NetworkVariableCollectionsTests.CollectionTypes.List })]
public class NetworkVariableCollectionsTests : NetcodeIntegrationTest
Constructors
NetworkVariableCollectionsTests(HostOrServer, CollectionTypes)
Declaration
public NetworkVariableCollectionsTests(NetcodeIntegrationTest.HostOrServer hostOrServer, NetworkVariableCollectionsTests.CollectionTypes collectionType)
Parameters
Properties
NumberOfClients
Declaration
protected override int NumberOfClients { get; }
Property Value
Overrides
Methods
OnCreatePlayerPrefab()
Override this to add components or adjustments to the default player prefab
m_PlayerPrefab
Declaration
protected override void OnCreatePlayerPrefab()
Overrides
OnSetup()
Declaration
protected override IEnumerator OnSetup()
Returns
Overrides
TestDictionaryCollections()
Declaration
[UnityTest]
public IEnumerator TestDictionaryCollections()
Returns
TestDictionaryNestedCollections()
Declaration
[UnityTest]
public IEnumerator TestDictionaryNestedCollections()
Returns
TestHashSetBuiltInTypeCollections()
Declaration
[UnityTest]
public IEnumerator TestHashSetBuiltInTypeCollections()
Returns
TestListBuiltInTypeCollections()
Declaration
[UnityTest]
public IEnumerator TestListBuiltInTypeCollections()
Returns
TestListSerializableObjectCollections()
Declaration
[UnityTest]
public IEnumerator TestListSerializableObjectCollections()
Returns