Serializing custom types
Hello,
In an operation response & request, I would like to be able to send my own custom class. For example, I've created my own vector class that is shared between the client & the server. In my Operation-derived class, I would like to define a property like so:
Will Photon automatically know how to serialize my Vector2 into an array of bytes (which is what seems to be sent over the network for an operation)? Can someone provide instructions on how to make this work?
In an operation response & request, I would like to be able to send my own custom class. For example, I've created my own vector class that is shared between the client & the server. In my Operation-derived class, I would like to define a property like so:
[ResponseParameter( Code=(short)ParameterCode.Position, IsOptional=false )] public Vector2 Position { get; set; }
Will Photon automatically know how to serialize my Vector2 into an array of bytes (which is what seems to be sent over the network for an operation)? Can someone provide instructions on how to make this work?
0
Comments
Thanks for the idea though, will add it to the feature wish list for future versions.