Class NetworkObjectOwnershipTests
Inheritance
NetworkObjectOwnershipTests
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
[TestFixture(new object[] { NetcodeIntegrationTest.HostOrServer.Host })]
[TestFixture(new object[] { NetcodeIntegrationTest.HostOrServer.Server })]
public class NetworkObjectOwnershipTests : NetcodeIntegrationTest
Constructors
NetworkObjectOwnershipTests(HostOrServer)
Declaration
public NetworkObjectOwnershipTests(NetcodeIntegrationTest.HostOrServer hostOrServer)
Parameters
Properties
NumberOfClients
Declaration
protected override int NumberOfClients { get; }
Property Value
Overrides
Methods
OnServerAndClientsCreated()
Declaration
protected override void OnServerAndClientsCreated()
Overrides
TestAuthorityChangingOwnership()
Validates that when changing ownership NetworkTransform does not enter into a bad state
because the previous and current owner identifiers are the same. For client-server this
ends up always being the server, but for distributed authority the authority changes when
ownership changes.
Declaration
[UnityTest]
public IEnumerator TestAuthorityChangingOwnership()
Returns
TestOwnedObjectCounts()
Declaration
[UnityTest]
public IEnumerator TestOwnedObjectCounts()
Returns
TestOwnershipCallbacks(OwnershipChecks)
Declaration
[UnityTest]
public IEnumerator TestOwnershipCallbacks(NetworkObjectOwnershipTests.OwnershipChecks ownershipChecks)
Parameters
Returns
TestOwnershipCallbacksSeveralClients(OwnershipChecks)
Verifies that switching ownership between several clients works properly
Declaration
[UnityTest]
public IEnumerator TestOwnershipCallbacksSeveralClients(NetworkObjectOwnershipTests.OwnershipChecks ownershipChecks)
Parameters
Returns
TestPlayerIsOwned()
Declaration
[Test]
public void TestPlayerIsOwned()