- Home /
ScriptableObject problem
Hello all! I use this http://wiki.unity3d.com/index.php?title=CreateScriptableObjectAsset to save my scriptableObject class in asset. It works well but if I restarted unity3d , then stored asset breaks.
Before restarting:
After restarting:
Answer by AyAMrau · Sep 07, 2014 at 04:54 PM
@Hitjones Even in your first screenshot the Script reference says None, which means there is an issue from the start with the script.
It quite possible that the Scriptable object file name and class name don't match. If not could you also post the code for the scriptable object you are creating?
thank you so much, spent couple of days wandering why scriptable objects are broken in android build.
Amazing answer! I spent quite a lot of time figuring out what maight have caused this problem and your answer solved the issue. The file name and class name did not much — I wanted to keep my base and derived ScriptableObjects in a single file as long as they don't grow too much for convenience — turns out that Unity doesn't like that.
Also a note for other visitors: this issue may be related to “The object ... has been destroyed, but you are still trying to access it” error. $$anonymous$$y $$anonymous$$onoBehaviours referencing this broken ScriptableObject were throwing this exception in the editor, like if they had gotten destroyed (even though they hadn't — I could still see them in the hierarchy).
$$anonymous$$any many thanks for the solution I faced the same issue in android build./ Note: Everything works fine in editor but when take build out and run on device it doesn't load the scriptable object.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Saving class fields in the Asset 0 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Unity3D Pressure Plate request. 3 Answers
JavaScript and Ajax second addition Tutorial 11 case problem 2 0 Answers