UnityEngine.Networking.NetworkManager.StopMatchMaker C# (CSharp) Method

StopMatchMaker() public method

Stops the MatchMaker that the NetworkManager is using.

public StopMatchMaker ( ) : void
return void
        public void StopMatchMaker()
        {
            if (((this.matchMaker != null) && (this.matchInfo != null)) && ((this.matchInfo.networkId != NetworkID.Invalid) && (this.matchInfo.nodeId != NodeID.Invalid)))
            {
                this.matchMaker.DropConnection(this.matchInfo.networkId, this.matchInfo.nodeId, this.matchInfo.domain, new NetworkMatch.BasicResponseDelegate(this.OnDropConnection));
            }
            if (this.matchMaker != null)
            {
                UnityEngine.Object.Destroy(this.matchMaker);
                this.matchMaker = null;
            }
            this.matchInfo = null;
            this.matches = null;
        }

Usage Example

コード例 #1
0
 public void Back()
 {
     host_button.active          = true;
     join_button.active          = true;
     play_button.active          = false;
     refresh_button.active       = false;
     host_game_name_input.active = false;
     tint.active = false;
     manager.StopMatchMaker();
     back_button.active = false;
 }
All Usage Examples Of UnityEngine.Networking.NetworkManager::StopMatchMaker