NonSerialized Attribute for SerializableSFSType

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

User avatar
Whiskey
Posts: 45
Joined: 28 Oct 2010, 06:27
Location: The Netherlands
Contact:

NonSerialized Attribute for SerializableSFSType

Postby Whiskey » 27 May 2011, 11:07

The .NET framework offers a [NonSerialized] attribute that indicates that a field should not be serialized. Is there something similar for the SerializableSFSType ?

In addition, I tried to serialize a class MailBag that contains a list Envelopes of a custom class. The custom class in called Envelope. In itself, I can serialize an Envelope object and send it to the server. However, if I try to send a list of envelopes with the class MailBag, I get an error:
field: Envelopes, type: MonoField -- unsupported type!

I also tried using an array: MailBag.Envelopes = new Envelope[] { env };

But this does not work either. How would I send my mailbag to the server?
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 29 May 2011, 15:13

Its on the todo list to expand support of class sending to also cover collections.

/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 38 guests