private static void ReportRoomSetupProgress(IRealTimeMultiplayerListener listener, GKMatch match, NSError error, bool programmaticMatchmaking = false)
        {
            if (listener == null)
            {
                return;
            }

            // Setup failed.
            if (match == null || error != null)
            {
                listener.OnRoomConnected(false);
                return;
            }

            // Setup succeeded or is progressing.
            float progress;
            bool  completed = IsRoomSetupComplete(match, out progress);

            // On progress.
            listener.OnRoomSetupProgress(progress);

            // Connected.
            if (completed)
            {
                // Programmatic matchmaking has finished.
                if (programmaticMatchmaking)
                {
                    GKMatchmaker.SharedMatchmaker().FinishMatchmakingForMatch(match);
                }

                listener.OnRoomConnected(true);
            }
        }
Example #2
0
 public void OnRoomSetupProgress(float percent)
 {
     listener.OnRoomSetupProgress(percent);
     if (!isProgrammaticMatchmaking)
     {
         PlayGamesPlatform.Instance.RealTime.ShowWaitingRoomUI();
     }
 }