Unity Editor-Only GameObject Rendering

I have various entities like enemy/player spawners that are invisible in the game world but would be useful if they were visible in the editor. What’s the best way to achieve this? At the moment I’m using a Mesh Renderer that’s disabled on the Start event, but this is rather clunky.

2 Answers

2

Reference:
http://forum.unity3d.com/threads/hidden-objects-in-game-but-not-in-editor.4355/

Basically, it’s probably easier to create a layer for editor-only GameObjects. And then turn off rendering that layer by the camera.

I do that by assigning “Icon” to those gameobject…Like this,61624-select-icon.png

It gets shown up in editor like this,
61625-icnonned-empty.png

its a 2d game, please see what i wrote below in repply to @justinijan

–

i require that when 2 enemies collide, only one of them gets its movement speed changed. but only one

–