Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Networking Are there any network examples for 5.4...

Discussion in '5.4 Beta' started by Arowx, Mar 19, 2016.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Just trying the Tanks networking example but hitting lots of bugs in 5.4 it looks like the API changes stop it from working, so any examples that work with 5.4?

    Errors I'm seeing:

     
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Managed to get it to work, but it's a bit of a hack.
     
  3. stellarvr

    stellarvr

    Joined:
    Mar 21, 2016
    Posts:
    1
    Can I ask... What was your hack? Id rather not have to rip and replace all my lobby scripts :/
     
  4. Deleted User

    Deleted User

    Guest

  5. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Deleted User likes this.
  6. Eiseno

    Eiseno

    Joined:
    Nov 1, 2015
    Posts:
    86
    Read 5.4b documentation for fix it.
    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);

    Regards
     
    Deleted User likes this.