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: solution.dll
Syntax
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
[UnityTestAttribute]
public IEnumerator ClientPlayerDisconnected(DisconnectTests.ClientDisconnectType clientDisconnectType)
Parameters
Returns
OnCreatePlayerPrefab()
Override this to add components or adjustments to the default player prefab
m_PlayerPrefab
Declaration
protected override void OnCreatePlayerPrefab()
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
OnSetup()
Declaration
protected override IEnumerator OnSetup()
Returns
Overrides