From 6b5163e9577e0b8304d78a5ec87df7650f63fe9d Mon Sep 17 00:00:00 2001 From: James Frowen Date: Fri, 5 Aug 2022 18:04:37 +0100 Subject: [PATCH] fix: fixing example auto connect --- Assets/Example/AutoStart.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Assets/Example/AutoStart.cs b/Assets/Example/AutoStart.cs index 70287c6..fdcc8ff 100644 --- a/Assets/Example/AutoStart.cs +++ b/Assets/Example/AutoStart.cs @@ -68,7 +68,12 @@ private async UniTask 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();