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
Inherited Members
Namespace: Unity.Netcode.RuntimeTests
Assembly: solution.dll
Syntax
public class DisconnectTests : NetcodeIntegrationTest
Constructors
Name | Description |
---|---|
DisconnectTests(OwnerPersistence) |
Properties
Name | Description |
---|---|
NumberOfClients |
Methods
Name | Description |
---|---|
ClientPlayerDisconnected(ClientDisconnectType) | |
OnCreatePlayerPrefab() | Override this to add components or adjustments to the default player prefab m_PlayerPrefab |
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. |
OnSetup() | Called before creating and starting the server and clients Note: For AllTests and PerTest mode integration tests. For those two modes, if you want to have access to the server or client NetworkManagers then override OnServerAndClientsCreated(). m_ServerNetworkManager and m_ClientNetworkManagers |