Skip to content

Commit

Permalink
fix: server offline does not need a specific object (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
uweeby committed Apr 28, 2021
1 parent b808c87 commit 9ca7639
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Assets/Mirage/Runtime/ServerObjectManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ internal void SpawnObject(GameObject obj, INetworkPlayer ownerPlayer)
{
if (!Server || !Server.Active)
{
throw new InvalidOperationException("SpawnObject for " + obj + ", NetworkServer is not active. Cannot spawn objects without an active server.");
throw new InvalidOperationException("NetworkServer is not active. Cannot spawn objects without an active server.");
}

NetworkIdentity identity = obj.GetComponent<NetworkIdentity>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void SpawnObjectServerOfflineExceptionTest()
serverObjectManager.SpawnObject(new GameObject(), connectionToServer);
});

Assert.That(ex.Message, Is.EqualTo("SpawnObject for " + obj + ", NetworkServer is not active. Cannot spawn objects without an active server."));
Assert.That(ex.Message, Is.EqualTo("NetworkServer is not active. Cannot spawn objects without an active server."));
}

[Test]
Expand Down

0 comments on commit 9ca7639

Please sign in to comment.