I am encountering today a quite bizarre issue, and also quite specific.
When using “Base” as member name (Base being a Serializable class) within a Singleton (using the classic c# singleton implementation), Unity crashes (when saving/loading the scene).
I know “base” is a reserved word, but is “Base” as well? What am I missing ?
create a Singleton
in this singleton, create a “public TestClass Base;”
TestClass is defined as:
public class testclass
public int stuff;
- No crash if with another member name (such as “TheBase”)
- No crash outside of a Singleton either (although the Singleton doesn’t use any “Base”)
- No crash if Base is defined as an int (for instance) rather than a Serializable custom class