Sign in to follow this  
Hikaru

[.net] Problems with serializing in DirectX

Recommended Posts

Hikaru    122
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
Bob Janova    769
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this