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.
Inherited Members
Namespace: Unity.Netcode.RuntimeTests
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
Type | Name | Description |
---|---|---|
Netcode |
hostOrServer | |
Network |
collectionType |
Properties
NumberOfClients
Declaration
protected override int NumberOfClients { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
Methods
OnCreatePlayerPrefab()
Override this to add components or adjustments to the default player prefab
m_Player
Declaration
protected override void OnCreatePlayerPrefab()
Overrides
OnSetup()
Called before creating and starting the server and clients
Note: For All
Declaration
protected override IEnumerator OnSetup()
Returns
Type | Description |
---|---|
IEnumerator |
Overrides
TestDictionaryCollections()
Declaration
[UnityTest]
public IEnumerator TestDictionaryCollections()
Returns
Type | Description |
---|---|
IEnumerator |
TestDictionaryNestedCollections()
Declaration
[UnityTest]
public IEnumerator TestDictionaryNestedCollections()
Returns
Type | Description |
---|---|
IEnumerator |
TestHashSetBuiltInTypeCollections()
Declaration
[UnityTest]
public IEnumerator TestHashSetBuiltInTypeCollections()
Returns
Type | Description |
---|---|
IEnumerator |
TestListBuiltInTypeCollections()
Declaration
[UnityTest]
public IEnumerator TestListBuiltInTypeCollections()
Returns
Type | Description |
---|---|
IEnumerator |
TestListSerializableObjectCollections()
Declaration
[UnityTest]
public IEnumerator TestListSerializableObjectCollections()
Returns
Type | Description |
---|---|
IEnumerator |