Which types can be used with player custom properties?

Options
Hi,

I tried adding a value of type Dictionary<OurEnumType, OurOtherType> to the player custom properties, but got the error

Exception: Unexpected - cannot serialize Dictionary with value type: OurEnumType

I'm a bit confused about this error (why OurEnumType would be the problem?), but I'm guessing that what it really means is that it can't serialize the Dictionary - is this the case?

Please could you let me know what types can/cannot be added to custom properties? (or perhaps this is documented somewhere).

Thank you!

S

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @sosh,

    The information you are looking for is available in this documentation page.
    We will make it available for PUN docs as well soon.
  • sosh
    sosh
    edited June 2016
    Options
    Thanks JohnTube.

    Hmm, looks like Dictionary is supported. Any idea why it's not serializing mine?

    (I'll post another question for this later)
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Please convert enum values to byte or int. Photon can't handle custom default by default.
    The issue is not in Dictionary itself but in OurEnumType.
  • sosh
    Options
    Thanks! One question then - if I used PhotonPeer.RegisterType to register OurEnumType, would it then work (as the key of the dictionary)?