Skip to content

Commit

Permalink
fix: fixing unspawn handlers not being used in disconnect cleanup
Browse files Browse the repository at this point in the history
swapping order of clean up, so that object are destroyed with their handlers before those handlers are cleared
  • Loading branch information
James-Frowen committed Feb 13, 2024
1 parent 053552a commit 915f307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Mirage/Runtime/ClientObjectManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ internal void ClientStarted(NetworkClient client)

private void OnClientDisconnected(ClientStoppedReason reason)
{
ClearSpawners();
DestroyAllClientObjects();
ClearSpawners();

// reset for next run
_client.Disconnected.RemoveListener(OnClientDisconnected);
Expand Down

0 comments on commit 915f307

Please sign in to comment.