Skip to content

Commit

Permalink
fix: preparing client objects on connect (#876)
Browse files Browse the repository at this point in the history
this allows scene objects in first scene to be spawned
  • Loading branch information
James-Frowen committed Aug 16, 2021
1 parent c19929f commit 9789c0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Mirage/Runtime/ClientObjectManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ void OnClientConnected(INetworkPlayer player)
syncVarReceiver = new SyncVarReceiver(Client, Client.World);
RegisterSpawnPrefabs();

// prepare objects right away so objects in first scene can be spawned
// if user changes scenes without NetworkSceneManager then they will need to manually call it again
PrepareToSpawnSceneObjects();

if (Client.IsLocalClient)
{
RegisterHostHandlers();
Expand Down

0 comments on commit 9789c0b

Please sign in to comment.