Помогите найти ошибку, возникает, когда нажимают на кнопку создать сервер.
Код
public void StartMultiplayerServer(Action callback)
{
if (state != NetworkState.Inactive)
{
throw new InvalidOperationException("Network currently active. Disconnect first.");
}
// minPlayers = 2;
// maxPlayers = multiplayerMaxPlayers;
m_NextHostStartedCallback = callback;
state = NetworkState.InLobby;
gameType = NetworkGameType.Direct;
StartHost();
}
/// <summary>
/// Create a matchmaking game
/// </summary>
public void StartMatchmakingGame(string gameName, Action<bool, MatchInfo> onCreate)
{
if (state != NetworkState.Inactive)
{
throw new InvalidOperationException("Network currently active. Disconnect first.");
}
// minPlayers = 2;
// maxPlayers = multiplayerMaxPlayers;
state = NetworkState.Connecting;
gameType = NetworkGameType.Matchmaking;
StartMatchMaker();
m_NextMatchCreatedCallback = onCreate;
(((([b]пишет что здесь ошибка[/b])))))matchMaker.CreateMatch(gameName, (uint)m_MultiplayerMaxPlayers, true, string.Empty, string.Empty, string.Empty, 0, 0, OnMatchCreate);
}
/// <summary>
/// Initialize the matchmaking client to receive match lists
/// </summary>
public void StartMatchingmakingClient()
{
if (state != NetworkState.Inactive)
{
throw new InvalidOperationException("Network currently active. Disconnect first.");
}
// minPlayers = 2;
// maxPlayers = multiplayerMaxPlayers;
state = NetworkState.Pregame;
gameType = NetworkGameType.Matchmaking;
StartMatchMaker();
}
/// <summary>
/// Join a matchmaking game
/// </summary>
я хочу создать свою мультиплеер игру, взял как исходник с unity пример, вот разбираюсь. Спасибо всем!!