Tests: NetworkTransform2 tests use host mode for now to make .spawned split easier

This commit is contained in:
vis2k 2021-08-11 19:22:12 +08:00
parent 309761a37b
commit b089692dab

View File

@ -29,9 +29,14 @@ public class NetworkTransform2kTests : MirrorTest
public override void SetUp()
{
// set up world with server & client
// host mode for now.
// TODO separate client & server after .spawned split.
// we can use CreateNetworkedAndSpawn that creates on sv & cl.
// then move on server, update, verify client position etc.
base.SetUp();
NetworkServer.Listen(1);
ConnectClientBlockingAuthenticatedAndReady(out connectionToClient);
ConnectHostClientBlockingAuthenticatedAndReady();
connectionToClient = NetworkServer.localConnection;
// create a networked object with NetworkTransform
CreateNetworkedAndSpawn(out GameObject go, out NetworkIdentity _, out component, connectionToClient);