• Advertisement
Sign in to follow this  

[.net] Problems with serializing in DirectX

This topic is 4362 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I have a problem when i want to save my tilebased maps. I've got a Tile class that i want to be serializable, but in that class I have another class instance from my SpriteClass. The problem is that I've got some DirectDraw code in that SpriteClass and it doesn't want to be serialized. I've put [Serializable] before the class and all that. So, is there some way to do this? or should I consider using StreamWriter instead of FileWriter and binaryFormatter?

Share this post


Link to post
Share on other sites
Advertisement
You need to make the SpriteClass serialisable too. If there are DD fields in there that can't be serialised normally, you need to implement custom serialisation in your sprite class – look up ISerializable.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement