Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

UNet Filter MatchDesc for password-protection

Discussion in 'UNet' started by AllMightyNico, Jun 15, 2015.

  1. AllMightyNico

    AllMightyNico

    Joined:
    Jun 12, 2015
    Posts:
    14
    Hello Folks,

    I am just creating a lobbysystem for my new RTS game. Right now, I want to implement a matchbrowser/serverlist, as you might have seen in various games. However, I'd like to implement filtering and display of roomattributes, such as amount of players, current map and password-protection.

    Getting stuff, such as roomnames and max. players is pretty easy to do. You can just iterate through the List<MatchDesc> you recieved from ListMatches() and pick the info from there. But when it comes to password protection, I'd like to be able to mark password-proteced servers visually and filter them out. But the MatchDesc Class doesn't seem to offer information about that.

    Does anyone have an idea how to do this?
     
  2. JeremyUnity

    JeremyUnity

    Unity Technologies

    Joined:
    Mar 4, 2014
    Posts:
    147
    Hi!

    You're right, it doesn't allow direct filtering right now for if a match is password protected. I'll add that to the interface though it wont be built in until another version of unity goes out.

    For now it does allow filtering against name though. As a work around you could have a special string in non password protected matches that you put in the nameFilter attribute of the ListMatchRequest, which is populated by setting the matchNameFilter on the ListMatches call.
     
  3. AllMightyNico

    AllMightyNico

    Joined:
    Jun 12, 2015
    Posts:
    14
    Wow that was a fast response from the devs :O. Thanks a lot, you rock!