I have a SerializedScriptableObject that has a polymorphic list field. Elements on said list lose their private, non-serialized, constructor-initialized fields when you hit Play or recompile.
I’m not trying to serialize the fields. I’m trying to get them to initialize, just like you can do with Monobehaviors and ScriptableObjects fields.
How can we reproduce it?
I prepared a test project for you. All you have to do is open the ScriptableObject that is on the Assets folders and follow instructions.
If screenshots would help explain or demonstrate your issue, please include these.
After hitting Play:
This is the code of my private non-serialized fields:
What version of Unity are you using?
What version of Odin are you using?
Do you have Editor Only mode enabled?
What operating system are you on?
Windows 10 64 bits