0

Script based left-side icons for hierarchy.

karmicto 4 weeks ago 0


Currently, the non-hover left-side icon for hierarchy items is either classic unity or a preview thumbnail of the object in question. This works nicely for world objects, but many a times, an object may not have a rendered representation or one that the editor can create a preview thumbnail for. Also completely useless for UI.

So, how about script-based icons for such objects? You can keep a priority list of script, select the highest priority component on a game object, and display its icon on the left side of the hierarchy item for the gameobject. E.g., a gameobject with a "TextMeshProUGUI" and "Content Size Fitter" components would display the editor script icon for TextMeshProUGUI (the blue 'T') in the hierarchy (without hover), letting us know the "Core Identity" of the gameobject at a glance. A lot of people use game objects this way, trying to separate them by function/identity instead of trying to overlap as many components on a single GO as possible. Something like this:

Unity Version:
2020.2
Peek Version:
1.6