Class DisconnectTests
Validates the client disconnection process.
This assures that:
- When a client disconnects from the server that the server:
-- Detects the client disconnected.
-- Cleans up the transport to NGO client (and vice versa) mappings.
- When a server disconnects a client that:
-- The client detects this disconnection.
-- The server cleans up the transport to NGO client (and vice versa) mappings.
- When DestroyWithOwner the server-side player object is destroyed
- When DontDestroyWithOwner the server-side player object ownership is transferred back to the server
Inheritance
DisconnectTests
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
[TestFixture(new object[] { DisconnectTests.OwnerPersistence.DestroyWithOwner })]
[TestFixture(new object[] { DisconnectTests.OwnerPersistence.DontDestroyWithOwner })]
public class DisconnectTests : NetcodeIntegrationTest
Constructors
DisconnectTests(OwnerPersistence)
Declaration
public DisconnectTests(DisconnectTests.OwnerPersistence ownerPersistence)
Parameters
Properties
NumberOfClients
Declaration
protected override int NumberOfClients { get; }
Property Value
Overrides
Methods
ClientPlayerDisconnected(ClientDisconnectType)
Declaration
[UnityTest]
public IEnumerator ClientPlayerDisconnected(DisconnectTests.ClientDisconnectType clientDisconnectType)
Parameters
Returns
OnCreatePlayerPrefab()
Declaration
protected override void OnCreatePlayerPrefab()
Overrides
OnServerAndClientsCreated()
Declaration
protected override void OnServerAndClientsCreated()
Overrides
OnSetup()
Declaration
protected override IEnumerator OnSetup()
Returns
Overrides