- Home /
ScriptableObject assets don't show in inspector randomly.
If I create a few instances of a basic ScriptableObject class, upon returning to editor after play mode one or more of them will be broken; when clicking on it nothing is shown in the inspector. Also, the name of the .asset is not even shown at the bottom of the file browser window. If I re-enter play mode and exit again it will show, but another one or more will be blanked out instead. Saving any change to the class fixes them. Bug? Anyone else have this problem?
I tried new project on new computers and different versions including 2018.1 and it is consistently happening.
I can deal with this annoyance, but I can see a designer or project manager losing confidence quickly if this doesn't work 100%.
You aren't using a custom editor for them right? Also, is your code modifying your scriptable object's hideFlags?
No, i've never had a problem like this in the las 8 years. $$anonymous$$ake sure you:
have each ScriptableObject derived class in it's own script file and that the classname matches the filename.
don't have any editor scripts which might tinker with the inspector. This includes CustomEditors as well as PropertyDrawers.
don't get any kind of error in the console.
Since your ScriptableObject is just a "basic" one, can you include the class in your question? If you don't want to include your actual class, can you create one that reproduces this problem?
Can you create a new project and see if one of the objects in question misbehaves without your other project libraries influencing it?
Your answer
Follow this Question
Related Questions
Proper way to save ScriptableObjects changed during play mode 2 Answers
Image sprite loaded from scriptable object ignores color 0 Answers
How to use "SerializeObject" with an object which doesn't derive from Object? 1 Answer
Variable will not change? 1 Answer
Unique function for each instance of a scriptable object 2 Answers