How do I show a model to represent a gameObject in the editor view?


I’m interested in showing a model to represent a gameObject that has no visual in game. This is similar to the spawn icon that you can drag around in the Halo series’ Forge editor. You can see a 3d model representing the spawn point, but it won’t show up when you play the game.

A somewhat crude hack for this is to child any visual object you want to use to the invisible game object and have the main object check for it and destroy it in the Start() method.

We did something similar for level editing.

Actually, as I recall we had a set of “Flag” objects we childed to invisibles, and had a standard script for such flags that did the “Suicide on Start()” thing.

It looks like robertbu’s suggestion about the gizmos class did the trick. I was able to use it to get the UI item I wanted.