Search Unity

CreateMatchRequest.matchAttributes

Discussion in 'Multiplayer' started by virror, Sep 21, 2015.

  1. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    matchAttributes seems to only take <string, long> which seems amazingly limited?
    Either im using it wrong or it seems impossible to send a string as the value?
    If this is correct then the matchAttributes is utterly useless for me : (

    How do i send custom strings when creating a match?
     
  2. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Would it be possible to get some official on this issue?
    Something thats planned to add or is it possible to workaround somehow?
     
  3. TheWarper

    TheWarper

    Joined:
    Nov 3, 2013
    Posts:
    112
    Last edited: Feb 2, 2016
  4. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    I agree, I'd rather have 1 string (that I could set as some json), then 10 long values.

    Is it possible to change these as the match is running. It would be handy to report back the current score, or if a team is winning, or the match has a certain amount of time left, etc.
     
  5. TheWarper

    TheWarper

    Joined:
    Nov 3, 2013
    Posts:
    112
    I don't think that's possible right now since the host creates a match with a CreateMatchRequest and specifies the attributes there. It'd be great to see it available in the future.
     
  6. mas

    mas

    Joined:
    Nov 14, 2010
    Posts:
    696
    I agree that is would be nice to boost the attributes feature so that we can put more match meta data in. so longs, floats, strings and bools perhaps.

    More important ... to be able to set, retrieve and alter it (by match host) while game is running.

    This will improve the world of lobby creation and flexibility a lot and is ... basically essential

    for example ( and requested in some other thread as well ) ..

    To be able close a match, when all spots have been taken or when the host 'closes' it as he sees fit, this has to be reflected in the list of matches.

    We do not want to have that match appear in the list, or do some hard net 'work' by joining a 'closed' game and be disconnected after syncing 'match closed' state from the host/server.

    It will make the world for us net programmers a lot more easier ..

    so unity .. pretty please ..

    • public Dictionary<string,long> matchAttributes;

      would become ...

      public Dictionary<string , object> matchAttributes;


    • implement ChangeMatchRequest, class
    • implement ChangeMatchResponse

    • and maybe a

      MatchDesc. . public void Update()

      that will update the data ( like currentSize and matchAttributes ) of
      a specific MatchDesc object.
    this year ?

    Cheers!
     
  7. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    Can someone from Unity address this question/idea?
     
  8. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Would love to get some official answer on this one.
     
  9. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    I think they are aware of this issue. I at least know it was mentioned a couple of times in the recent multiplayer improvements thread.
     
  10. Skeledurr

    Skeledurr

    Joined:
    Jan 5, 2015
    Posts:
    23
    I am currently trying to work out if I can update the matchAttributes. I'm assuming after reading this thread that it isn't a thing yet..

    I think it's time I stop trying to use UNet.
     
  11. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    No match attributes yet as far as I know : / And this is sadly a big problem
     
  12. iamthejames

    iamthejames

    Joined:
    Mar 23, 2015
    Posts:
    7
    still no reaction from unity? :(
     
  13. nxtboyIII

    nxtboyIII

    Joined:
    Jun 4, 2015
    Posts:
    281
    I need this too!!
     
  14. Driiades

    Driiades

    Joined:
    Oct 27, 2015
    Posts:
    151
    How do you use match attributes ?

    It will solve my current locked game problem...

    Please, say me how to put an attribute on the match when my game start (like : "locked" : 1 or "locked" : -1 to know if my match is locked or not) and how to read it for my automatchmaking.

    This will save me 4 hours or research xD


    Edit : oh... it' just for the match creation ? ......... Ok i just can't lock my match .. super !
     
  15. Deleted User

    Deleted User

    Guest

    It seems it's still doesn't work, anyone found another way?
     
  16. TheWarper

    TheWarper

    Joined:
    Nov 3, 2013
    Posts:
    112
    Wow