- Home /
Inspector doesn't always find candidate ScriptableObjects for serialized fields
I've got a few a serialized fields that get assigned ScriptableObjects through the Inspector. If I click the target icon to assign an element to these fields I get a pop-up window with candidates of the appropriate type. For some SO types, it shows me all the SO's I've created of that type, but for others, it shows none. Any ideas as to why this might be? The SO's are very similar: both are direct subclasses of ScriptableObject, both live in similar locations (subfolders of Assets/ScriptableObjects/). I can drag and drop them from the Project tab, but that's pretty clunky. Has anyone else run into this?
Answer by tantix · Apr 28, 2021 at 01:28 PM
Figured it out: I was using a class I'd created called TerrainData, not realizing that Unity already has a TerrainData class, and that seems to have been causing the problem. So I just renamed my class.
Your answer
Follow this Question
Related Questions
Custom Inspector: Using 'serializedObject' to access inherited members 1 Answer
missing (transform) vs none: how to code this or query for it? 1 Answer
How to add field in inspector to change audio on delay 1 Answer
Unity project weird behaviour - Scenes not opening / script links not working 1 Answer