(maybe) fix NetworkManager on WebGL

This commit is contained in:
Chipmunk 2023-06-13 17:16:37 -04:00
parent b28e5044fb
commit bcbb80abab

View file

@ -169,6 +169,14 @@ public class NetworkManager : Singleton<NetworkManager>
private IEnumerator CheckAccess(float timeout) private IEnumerator CheckAccess(float timeout)
{ {
#if UNITY_WEBGL #if UNITY_WEBGL
if (!this.connected && this.OnNetworkChange != null)
{
this.OnNetworkChange(true);
}
if (this.OnCheckResponse != null)
{
this.OnCheckResponse(true);
}
this.connected = true; this.connected = true;
this.OnCheckResponse = null; this.OnCheckResponse = null;
this.resolvingConnectivity = false; this.resolvingConnectivity = false;