[Serializable]
class LevelData
{
public Dictionary<Vector2, Level> levelButtonData;
}
Alright. I have this class I’m trying to deserialize using BinaryFormatter. It was fine yesterday, I didn’t get any exceptions or anything. I could simply serialize and and deserialize my class untill today I wanted to try again. It gave that exception I typed in the title section. And this line is the one that causes that exception:
LevelData lvlData = (LevelData)formatter.Deserialize(file);
I haven’t touched anything since yesterday. That’s the weird thing.