Hello All,
I have been working on a 3D project for some time now. It has been working for quite a while. In my early developments of this version I implemented a Save and Open feature which works by saving my custom 3D object file to any given location. When I first added this feature I made 2 sample basic scenes to do tests on etc.
I have now used these sample scenes for a couple of months and the application clearly has no problem de-serializing them :P The problem has come recently when I went to implement a new test scene which clearly works well in the program. I just cannot serialize it into a state like my other test scenes. It's using the same code save procedure as before. I have even marked all my classes as [Serializable()]
public void Save(string FileDirectory)
{
Stream FileWriter = File.Open(FileDirectory, FileMode.Create);
BinaryFormatter FileFormat = new BinaryFormatter();
FileFormat.Serialize(FileWriter, this);
FileWriter.Close();
}
I would post more code but I wouldn't know what else to post :p
Errors on the line FileFormat.Serialize(FileWriter, this);
The debug error's provide very limited help.
Type 'System.Drawing.SolidBrush' in Assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.
How can I find out what its not serializing?
Any body else have a similar trouble that would help?
Any body good at debugging give me tips (I'm a noob with VS 2010 an its debugging)?
Too many lost hours with this bug to solve on my own.
I will happily answer any queries.
A million thank you's to the person that helps me :)