I liked the saving section of this course - really insightful and clever. I especially like the dictionary option but get an intriguing error:
InvalidCastException: Specified cast is not valid…
this is the offending line of code: SerializableVector3 position = (SerializableVector3)state;
from the RestoreState(object state)
What is intriguing is the compiler knows its needs a cast, but it sure doesn’t like it. Thoughts or did I miss something in Sam’s lecture?