Add an icon or text to the inspector on custom scripts?

I have made a few hundred different scripts that is being used in a designer tool I am making to extend unity with

The scripts are roughly divided into three categories:

  • Entity
  • Event
  • Condition

EseLogic

Some of the Entities have very similar names to the Events and Conditions, and the designer who is testing the tool for me complained that it is hard to differentiate between the scripts on the GameObject in the inspector so I suggested I'd add an icon or some text to the inspector, but as far as I can tell it is not possible to do so easily.

I do not want to create 100's of Icon files in the Gizmos folder as suggested here: http://answers.unity3d.com/questions/469/changing-the-inspector-titlebar-icon-and-text

And since creating a custom inspector for my base classes would not work as stated here: http://answers.unity3d.com/questions/45576/do-custom-inspectors-support-inheritance I do not want to create 100's of new custom inspectors either, that would be even worse than having 100's of icons.

Then I am at a loss of what to do. Any ideas or suggestions would be greatly appreciated :)

See related question: http://answers.unity3d.com/questions/49029/how-to-use-resources-in-custom-editorwindow

Unless I am misunderstanding you completely, then that is more specific as to how to load an icon, which I already knew. But seeing as I have 100's of scripts I do not want to make 1 new custom inspector per script. (as I mentioned at the bottom of my question).

Would love to see an answer to this. Did you find a way in these months?

No, still no solution that I've found to this.

1 Answer

1

Use either:

  1. Default References (Inspector on script).
  2. AssetDatabase.LoadAssetAtPath or AssetDatabase.LoadAllAssetsAtPath.

So your first suggestion is to have an icon variable in the script, and that would show up in the inspector? Also,why would loading asset at a path help me putting an icon or text on the inspector of hundreds of scripts. I thought they only gave you the assets in code?