- Home /
Storing data about an asset only in the editor
I'm building a library of scriptable objects, each of which depends on some mesh data.
I'd like the ScriptableObjects I'm containing to maintain a reference to their source mesh (for ease of updating in the editor), while not depending on that reference at runtime, to save on memory.
It appears custom editors cannot persist data - is there a bucket for preference data related to an object - namely, Unity must do something similar with imported assets.
My guess, from the way it looks in the editor is that it's sort of like a Proxy pattern, with root level scriptableObjects having a reference to the actual game object (for example a ImportedMesh asset with reference to the resulting Mesh asset, or the fonts in which case the texture is the resulting data.
This is of course quite doable to implement, however, I'm wondering if there is an architecturally better way to implement this?
What is the best way to store data about an object that does not get included at build time?
Answer by jwalker · Apr 30, 2012 at 11:41 PM
I am wondering the same thing. I am considering storing this kind of data in script assets that aren't actually used by the game ever, but it seems like there must be a better way.
Your answer
Follow this Question
Related Questions
How to assign object reference to ObjectField knowing the object's name? 2 Answers
Custom inspector variable resets automatically 1 Answer
Dynamic serialized fields based on enum 0 Answers
Help with Missing Monobehaviours and Asset Serialization? 0 Answers
GameObject HideFlags.DontSave not working as expected 1 Answer