unity5.3 to unity5.4 網絡部分修改

Lobby Manager: 
public override void OnMatchCreate(bool success, string extendedInfo, MatchInfo matchInfo)
{
_currentMatchID = (ulong)matchInfo.networkId;

base.OnMatchCreate(success, extendedInfo, matchInfo);
}

public override void OnDestroyMatch(bool success, string extendedInfo)
{
if (_disconnectServer)
{
StopMatchMaker();
StopHost();
}
base.OnDestroyMatch(success, extendedInfo);
}


MatchDesc:
public void Populate(MatchInfoSnapshot match, LobbyManager lobbyManager, Color c)
{ ...

I disabled OnGUIMatchList function.I dont need it.

Join Match:
matchMaker.JoinMatch(networkID, "","","",0,0, lobbyManager.OnMatchJoined);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章