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

OnMatchCreate() public method

Callback that happens when a NetworkMatch.CreateMatch request has been processed on the server.

public OnMatchCreate ( bool success, string extendedInfo, MatchInfo matchInfo ) : void
success bool Indicates if the request succeeded.
extendedInfo string A text description for the error if success is false.
matchInfo UnityEngine.Networking.Match.MatchInfo The information about the newly created match.
return void
        public virtual void OnMatchCreate(bool success, string extendedInfo, MatchInfo matchInfo)
        {
            if (LogFilter.logDebug)
            {
                object[] args = new object[] { success, extendedInfo, matchInfo };
                Debug.LogFormat("NetworkManager OnMatchCreate Success:{0}, ExtendedInfo:{1}, matchInfo:{2}", args);
            }
            if (success)
            {
                this.StartHost(matchInfo);
            }
        }