Hello,
We are encountering a problem when attempting to use a [System.Serializable] ScriptableObject called NodeData. One of its public member variables is of type UnityEngine.Object. We use this type so we can drag a wide variety of different things into this field in the Inspector. This has been working great for dragging Prefabs, Images, AudioClips etc. into that field.
Our problems began when we started attempting to drag a different type of ScriptableObject (completely unrelated to NodeData) into the field. Though this initially worked fine (ScriptableObject descends from UnityEngine.Object), this has caused a bunch of strange issues later.
- Upon restarting Unity Editor and selecting the NodeData ScriptableObject we edited, that Object field looks like this:
There are weird parentheses for some reason.
2. Upon entering play mode, this goes away and is replaced by how the field should look:
3. Though the game works as expected in the Editor, on any built version, that field is interpreted as being null, even though it is definitely filled in the Editor.
Our hypothesis is that Unity is not properly serializing the Object field when we drag a ScriptableObject into it. We are using Unity 2017.3.1f1.
We can work around this issue by using a Prefab instead of a ScriptableObject, but this would require a bunch of refactoring. Does anyone have any ideas?
Thanks!