x


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?

more ▼

asked Mar 13 '11 at 06:43 PM

Brian Kehrer gravatar image

Brian Kehrer
2.8k 9 11 50

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

I have the same question

more ▼

answered Apr 30 '12 at 11:41 PM

jwalker gravatar image

jwalker
31 1 1 2

(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Apr 30 '12 at 11:41 PM

jwalker gravatar image

jwalker
31 1 1 2

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1675
x349
x181

asked: Mar 13 '11 at 06:43 PM

Seen: 820 times

Last Updated: Apr 30 '12 at 11:41 PM