File tree 1 file changed +16
-1
lines changed
testproject/Assets/Tests/Runtime/Animation
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -987,18 +987,33 @@ public void ShutdownWhileSpawnedAndStartBackUpTest()
987
987
NetworkObject networkObject = m_PlayerPrefab . AddComponent < NetworkObject > ( ) ;
988
988
NetcodeIntegrationTestHelpers . MakeNetworkObjectTestPrefab ( networkObject ) ;
989
989
m_ServerNetworkManager . NetworkConfig . Prefabs . Prefabs [ playerPrefabIndex ] . Prefab = m_PlayerPrefab ;
990
+ m_ServerNetworkManager . NetworkConfig . PlayerPrefab = m_PlayerPrefab ;
990
991
991
992
// Now, restart the server and the client
992
993
m_ServerNetworkManager . StartHost ( ) ;
993
994
994
995
foreach ( var clientNetworkManager in m_ClientNetworkManagers )
995
996
{
996
997
clientNetworkManager . NetworkConfig . Prefabs . Prefabs [ playerPrefabIndex ] . Prefab = m_PlayerPrefab ;
998
+ clientNetworkManager . NetworkConfig . PlayerPrefab = m_PlayerPrefab ;
997
999
clientNetworkManager . StartClient ( ) ;
998
1000
}
999
1001
1002
+
1003
+ bool AllClientsConnected ( )
1004
+ {
1005
+ foreach ( var client in m_ClientNetworkManagers )
1006
+ {
1007
+ if ( ! client . IsConnectedClient )
1008
+ {
1009
+ return false ;
1010
+ }
1011
+ }
1012
+ return true ;
1013
+ }
1014
+
1000
1015
// Wait for the server and clients to start and connect
1001
- success = WaitForClientsConnectedOrTimeOutWithTimeTravel ( ) ;
1016
+ success = WaitForConditionOrTimeOutWithTimeTravel ( AllClientsConnected , 1000 ) ;
1002
1017
Assert . True ( success , $ "Client Failed to Connect!") ;
1003
1018
VerboseDebug ( $ " ++++++++++++++++++ Disconnect-Reconnect Server Test Stopping ++++++++++++++++++ ") ;
1004
1019
}
You can’t perform that action at this time.
0 commit comments