File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments