Class NetworkVariablePermissionTests
Inherited Members
Namespace: Unity.Netcode.RuntimeTests
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
[TestFixtureSource("TestDataSource")]
public class NetworkVariablePermissionTests : NetcodeIntegrationTest
Constructors
NetworkVariablePermissionTests(HostOrServer)
Declaration
public NetworkVariablePermissionTests(NetcodeIntegrationTest.HostOrServer hostOrServer)
Parameters
Type | Name | Description |
---|---|---|
Netcode |
hostOrServer |
Properties
NumberOfClients
Declaration
protected override int NumberOfClients { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
Methods
ClientCannotChangeServerWritableNetVar()
Declaration
[UnityTest]
public IEnumerator ClientCannotChangeServerWritableNetVar()
Returns
Type | Description |
---|---|
IEnumerator |
ClientChangesOwnerWritableNetVar()
Declaration
[UnityTest]
public IEnumerator ClientChangesOwnerWritableNetVar()
Returns
Type | Description |
---|---|
IEnumerator |
ClientOwnerWithReadWriteChangesNetVar()
This tests the scenario where a client owner has both read and write permissions set. The server should be the only instance that can read the NetworkVariable. ServerCannotChangeOwnerWritableNetVar performs the same check to make sure the server cannot write to a client owner NetworkVariable with owner write permissions.
Declaration
[UnityTest]
public IEnumerator ClientOwnerWithReadWriteChangesNetVar()
Returns
Type | Description |
---|---|
IEnumerator |
OnServerAndClientsConnected()
Invoked after the server and clients have started and verified their connections with each other.
Declaration
protected override IEnumerator OnServerAndClientsConnected()
Returns
Type | Description |
---|---|
IEnumerator |
Overrides
OnServerAndClientsCreated()
This is invoked before the server and client(s) are started. Override this method if you want to make any adjustments to their NetworkManager instances.
Declaration
protected override void OnServerAndClientsCreated()
Overrides
ServerCannotChangeOwnerWritableNetVar()
Declaration
[UnityTest]
public IEnumerator ServerCannotChangeOwnerWritableNetVar()
Returns
Type | Description |
---|---|
IEnumerator |
ServerChangesOwnerWritableNetVar()
Declaration
[UnityTest]
public IEnumerator ServerChangesOwnerWritableNetVar()
Returns
Type | Description |
---|---|
IEnumerator |
ServerChangesServerWritableNetVar()
Declaration
[UnityTest]
public IEnumerator ServerChangesServerWritableNetVar()
Returns
Type | Description |
---|---|
IEnumerator |
TestDataSource()
Declaration
public static IEnumerable<TestFixtureData> TestDataSource()
Returns
Type | Description |
---|---|
IEnumerable<Test |