diff --git a/BubbleTransport/BubbleTransport.cs b/BubbleTransport/BubbleTransport.cs index 7c11de3..f6c0508 100644 --- a/BubbleTransport/BubbleTransport.cs +++ b/BubbleTransport/BubbleTransport.cs @@ -127,6 +127,7 @@ With an Invite (https://www.youtube.com/watch?v=e-RCPvUYxr4 [Example has 3 playe /// public void FindMatch() { + if (!Available()) return; if (Mirror.NetworkManager.singleton.maxConnections > 4) { Debug.LogError("Real time Game Center Matches support a max of 4 players"); @@ -140,7 +141,7 @@ public void FindMatch() public override bool Available() { #if UNITY_IOS - return Application.platform == RuntimePlatform.IPhonePlayer && available && new System.Version(Device.systemVersion) >= new System.Version("13.0"); + return available && new System.Version(Device.systemVersion) >= new System.Version("13.0"); #else return false; #endif @@ -168,6 +169,7 @@ public override void Shutdown() [AOT.MonoPInvokeCallback(typeof(OnInviteRecievedDelegate))] static void OnInviteRecieved() { + if (!instance.Available()) return; //An invite has been recieved, we shutdown the network and then call FindMatch if (NetworkManager.singleton.isNetworkActive) {