Skip to content

Commit 528d120

Browse files
update
Return 1st client NetworkManager if not auto-starting the session owner and there are no defined session owners in the existing client NetworkManagers.
1 parent 8f50f14 commit 528d120

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,18 @@ protected NetworkManager GetAuthorityNetworkManager()
194194
return client;
195195
}
196196
}
197-
Assert.Fail("No DA session owner found!");
197+
198+
// If we have not found a session owner and we are not
199+
// auto-starting the session owner, then return the first
200+
// client NetworkManager.
201+
if (!ShouldAutoStartSessionOwner())
202+
{
203+
return m_NetworkManagers[0];
204+
}
205+
else
206+
{
207+
Assert.Fail("No DA session owner found!");
208+
}
198209
}
199210

200211
return m_ServerNetworkManager;

0 commit comments

Comments
 (0)