Skip to content

Commit

Permalink
fix: NetworkServer.SpawnObjects: return false if server isn't running
Browse files Browse the repository at this point in the history
  • Loading branch information
miwarnec committed Feb 26, 2020
1 parent cdfc175 commit d4d524d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/Mirror/Runtime/NetworkServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1338,8 +1338,9 @@ internal static bool ValidateSceneObject(NetworkIdentity identity)
/// <returns>Success if objects where spawned.</returns>
public static bool SpawnObjects()
{
// only if server active
if (!active)
return true;
return false;

NetworkIdentity[] identities = Resources.FindObjectsOfTypeAll<NetworkIdentity>();
foreach (NetworkIdentity identity in identities)
Expand Down

0 comments on commit d4d524d

Please sign in to comment.