String Assets?

Okay, I have a very unusual situation.

I have a script that display objective on screen. I just changed a parameter in that script, so that instead of taking in a GUIText it takes in a String. It makes it easier on the developer, as he does not need to create an object for all of objective tooltips.

However, there is a few objective types that will have same description in instances of dozens scripts. I know that it is possible to store GUIText in the assets folder and objecti-point to it… but is it possible to store a String in assets folder and object-point to it?

If I used enums instead, how do I make it so that when ENUM is ‘.CUSTOM’, the inspector adds additional field to be filled by the developer?

You could store strings in the assets folder by creating a gameobject and adding a MonoiBeahviour with your string as a field. Then save the GameObject as a prefab.Reference the prefab to get the string at runtime. You could also create a custom class that can be saved as an Asset using CreateAsset and reference that at runtime.

If you want to to customise the inspector so it shows a text field when they select custom a Property Drawer would be ideal: