Class ExtendedNetworkShowAndHideTests
Inheritance
ExtendedNetworkShowAndHideTests
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
[TestFixture(new object[] { NetcodeIntegrationTest.HostOrServer.DAHost, true })]
[TestFixture(new object[] { NetcodeIntegrationTest.HostOrServer.DAHost, false })]
public class ExtendedNetworkShowAndHideTests : NetcodeIntegrationTest
Constructors
ExtendedNetworkShowAndHideTests(HostOrServer, bool)
Declaration
public ExtendedNetworkShowAndHideTests(NetcodeIntegrationTest.HostOrServer hostOrServer, bool enableSceneManagement)
Parameters
Properties
NumberOfClients
Declaration
protected override int NumberOfClients { get; }
Property Value
Overrides
Methods
This test validates the following NetworkShow - NetworkHide issue:
- During a session, a spawned object is hidden from a client.
- The current session owner disconnects and the client the object is hidden from is prommoted to the session owner.
- A new client joins and the newly promoted session owner synchronizes the newly joined client with only objects visible to it.
- Any already connected non-session owner client should "NetworkShow" the object to the newly connected client
(but only if the hidden object has SpawnWithObservers enabled)
Declaration
[UnityTest]
public IEnumerator HiddenObjectPromotedSessionOwnerNewClientSynchronizes()
Returns
OnNewClientCreated(NetworkManager)
CreateAndStartNewClient Only
Invoked when the newly created client has been created
Declaration
protected override void OnNewClientCreated(NetworkManager networkManager)
Parameters
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