PUN RaiseEvent: Why only up to 199 and what can I do to get around this restriction?

Options
In the docs, it says PUN uses RaiseEvent under the hood for all communications.
I'm guessing PunRPC also uses RaiseEvent so how can I make the "eventCode" be any value I want and not just 0-199?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    The Photon event code is of type byte. So possible values are from 0 to 255. Higher values are reserved because used for Photon's internal events.

    I doubt you need more values than that.
    If so you can just add the event type or code in the event data itself.
  • darkgolemgames
    edited March 2016
    Options
    So what I ended up doing is having an enum whose underlying type is byte and use that for my event codes. Then, since the ID I need to send could be large, I send it as part of the event data in an object[] that is casted as object before being sent in RaiseEvent. I then compare the ID to see if it's OK to proceed with the event. It's basically PunRPC all over again except I crafted this system to work with multiple components of the same type on the same GameObject.