Convert PhotonPeer.RegisterType from C# Code to js

I'm using Unity C# with Photon server for my mobile game, and i am register custom type by PhotonPeer.RegisterType. Now i want to build a web client, using HTML5 and js, use same server with mobile client. I was parse my C# code to js code success, but dont know how to use PhotonPeer.RegisterType in js, please help me to solve it. thanks.

Comments

  • Javascript SDK does not support custom types because javascript does not have types other than bool, number, string, object (dictionary) and array. Serialize your types to dictionary or array if support of js platform required.
    Note also that js client can't send types other than mentioned above. So clients with richer type set should expect this.
Sign In or Register to comment.