Hi! I have a problem with my custom class not saving after closing unity/recompiling.
public class HeadClass {
var eyes : Eye[,];
}
public class Eye {
var m : Layers[];
}
public class Layers{
var listOfLayers : List<GameObject>;
}
Now, inside a script, the HeadClass class is saved:
@SerializeField
var allHeads : List.<HeadClass>;
But the remaining classes inside the HeadClass are not. I think they are not beeing serialized, but I dont know how to make this work. Can i serialize those classes somehow?
EDIT:
and i tried to use serialise (docs) on my custom class, but that also doesn’t work:
@script Serializable
public class Eye {
var m : Layers[];
}
gives me an error.