Search Unity

How to not load lobby scene after destroying a match

Discussion in 'Multiplayer' started by lostudo, Aug 6, 2016.

  1. lostudo

    lostudo

    Joined:
    Jul 25, 2013
    Posts:
    14
    Hello,
    I'm currently working on a turn based multiplayer game(1vs1) and after a match finishes, i make players return to lobby scene and show each other a finishing menu. And than i destroy the match cause they will search for another random opponent. After i make the server destroy the match each player loads lobby scene again and that causes like instant menu disappears, lags and etc.
    Below is the code that i destroy the match and it works fine. I just wanted the network manager not to reload lobby scene after destroying the match. How can i do it?
    Thanks a lot.
    Code (CSharp):
    1.  
    2.     public void destroyMatch()
    3.     {
    4.         if (currentMatchID != 0)
    5.         {      
    6.             matchMaker.DestroyMatch((NetworkID)currentMatchID, OnDestroyMatch);
    7.             currentMatchID = 0;
    8.         }
    9.     }
    10.  
    11.     void OnDestroyMatch(BasicResponse extendedInfo)
    12.     {
    13.             StopMatchMaker();
    14.             StopHost();
    15.             Debug.LogError("Match Destroyed");
    16.     }
    17.