An editor only component?

Lately I’ve been experimenting with game objects that act in a certain way in game, but they could use a different preview in the editor. For example I have a series of hot points that I target through code but for which I just need the transform.
It is very convenient to see and move them in the editor, so for now I have a small label that I disable at runtime.

How does the idea of having editor only components, that can provide certain visual feedback sound? Somehow I see it more in line with the the way Defold operates in the engine and would love to see it in the editor extensions as well.

Just thinking out loud here :smile:

3 Likes

You could implement this a little more easily by assigning a render tag to a material that is not actually drawn in your game’s render script. Not perfect solution but it would work.

4 Likes

If you just disable rendering then the engine has to compute the matrix transformations for all the “editor” go’s. In my opinion disabling the go’s is a bit better.

I have used extensively this technique in my game. At init time I get all the transforms of the “editor” go’s and then I simply delete them.

However just my idea…

2 Likes

I agree that empty game objects are useful in many different scenarios and it’s unfortunate that a game object without components isn’t visible. It shouldn’t be that hard to implement in the editor I think.

4 Likes