- Home /
Question by
Gerrard · Jun 09, 2015 at 05:26 PM ·
serializationhideflags
AddObjectToAsset + HideFlags.HideAndDontSave
Hello !
I have an asset file that contains an array of "abstract class". I have read this post about serialization in unity : http://forum.unity3d.com/threads/serialization-best-practices-megapost.155352/
So my base class is abstract, derived from ScriptableObject, and have the hideFlags set to HideFlags.HideAndDontSave.
I use the method AssetDatabase.AddObjectToAsset(...) to store each object of the array in the assets file.
When I call AddObjectToAsset, Unity throws this error : !(o->TestHideFlag (Object::kDontSaveInEditor) && (options & kAllowDontSaveObjectsToBePersistent) == 0)
But everything seems to work fine. What does this error means, since I don't have any trouble using the assets created like this ?
Thanks!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613200809im_/https://answers.unity.com/themes/thub/images/avi.jpg)