Where is the best place to call PhotonPeer.RegisterType

Options
Is there some sort of a callback that I can hook into or is there a best practice on where to call this method?

From looking at the source I can see that Photon calls this once in it's constructor for PhotonNetwork. As for looking at the documentation here I'm not seeing a whole lot to go off.

Any guidance on this would be greatly appreciated.

Thanks in advance!

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @meatloaf,

    Custom types should be registered once on all clients before sending or receiving data containing that same custom type.
    So you could do it before connecting to Photon or before joining any room.
    For example in Awake() or Start() methods of a MonoBehaviour.
  • meatloaf
    Options
    Awesome. Exactly the feedback I was looking for.

    Thanks!