Skip to content

Commit

Permalink
fix: fixing example auto connect
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen committed Aug 7, 2022
1 parent cbf27b7 commit 6b5163e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Assets/Example/AutoStart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ private async UniTask<NetworkClient> CreateClient(NetworkIdentity prefabIdentity
return;

// else just connect again
client.Connect();
// must be in delay so client can fully shutdown
UniTask.Void(async () =>
{
await UniTask.Delay(100);
client.Connect();
});
});
client.Connect();

Expand Down

0 comments on commit 6b5163e

Please sign in to comment.