Snippet: Automatically Add Scene LabelsDecember 19, 2014
This script was written by Thundernerd on the Unity3D Answers Forum at the following link: http://answers.unity3d.com/questions/542890/scene-color-object-marking.html.
The following script allows you to automatically add a Label on a GameObject in a scene, here’s a screenshot on how that looks in the scene:
Scene Label
Create a new file in the Editor directory named IconManager and copy the above code into it. If you want to set the label of a GameObject you can call the code below.
Where obj is the GameObject that you want to give a label.