A very strange serialization problem

There’s no problem with Unity in this particular instance. This is how Unity has worked for years. Default serialisation doesn’t support null. Meaning recursively serialised types go infinite, something Unity guards against and warns about.

[SerializeReference] supports null, but there is next-to-no built in inspector and selection support for it (so I guess there is a problem, but not directly related to this). Hence why I mentioned the need for custom inspector work.

I wrote a simple example of how to get subtype selection here: abstract SkillList that can be edited in Inspector

Though with recursive structures you’ll likely need to implement something more custom.

1 Like