Is it possible to send base objects through UNET Network Messaging [messagebase]

Hello All,

Instead of sending a string, int, float, etc etc… I would like to send a base object type.

class MessageType 
    public short MessageID = 111;

class Message : Messagebase 
    string fooString;
    object fooObject;

public void WriteMessage (string Str, object Obj)
    Message MSG = new Message ();
    MSG.fooString = Str;
    MSG.fooObject = Obj;
    //Retrieve Your UNET Client and Send
    myclient.Send (MessageType.MessageID, MSG);

After trying this the string was received but not the object.

Any advice?


I believe it can only handle a subset of types, something like; Vector3, int, string, float. There may be more. You could use something like json to turn your objects into a string which the message system could handle.