Quantcast
Channel: Photon Server — Photon Engine
Viewing all articles
Browse latest Browse all 1557

Serialization problem

$
0
0
Hello, how can i send custom objects as parameters in operation responces or events. I tried implementing ISerializeble but i think photon internaly uses something different. Lets say i vant to send something like this:
public class RoomDTO
    {
        public RoomDTO() { }
        public RoomDTO(string name, int maxPlayerCount, int playerCount)
        {
            Name = name;
            MaxPlayerCount = maxPlayerCount;
            PlayerCount = playerCount;
        }

        public string Name { get; set; }
        public int MaxPlayerCount { get; set; }
        public int PlayerCount { get; set; }        
    }
It's a very simple object. Can I somehow send it?

Viewing all articles
Browse latest Browse all 1557

Trending Articles