Skip to content

Commit 37e476e

Browse files
authored
Made it so the transport only starts finding a match when available
Which I should have done earlier really
1 parent 9f0e846 commit 37e476e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

BubbleTransport/BubbleTransport.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ With an Invite (https://www.youtube.com/watch?v=e-RCPvUYxr4 [Example has 3 playe
127127
/// </summary>
128128
public void FindMatch()
129129
{
130+
if (!Available()) return;
130131
if (Mirror.NetworkManager.singleton.maxConnections > 4)
131132
{
132133
Debug.LogError("Real time Game Center Matches support a max of 4 players");
@@ -140,7 +141,7 @@ public void FindMatch()
140141
public override bool Available()
141142
{
142143
#if UNITY_IOS
143-
return Application.platform == RuntimePlatform.IPhonePlayer && available && new System.Version(Device.systemVersion) >= new System.Version("13.0");
144+
return available && new System.Version(Device.systemVersion) >= new System.Version("13.0");
144145
#else
145146
return false;
146147
#endif
@@ -168,6 +169,7 @@ public override void Shutdown()
168169
[AOT.MonoPInvokeCallback(typeof(OnInviteRecievedDelegate))]
169170
static void OnInviteRecieved()
170171
{
172+
if (!instance.Available()) return;
171173
//An invite has been recieved, we shutdown the network and then call FindMatch
172174
if (NetworkManager.singleton.isNetworkActive)
173175
{

0 commit comments

Comments
 (0)