Placeholders while designing a scene, not visible in simulation

Is there a built-in feature to place objects in design mode that won’t exist while running? I have the problem that the core scene of my game is dynamically generated, thus I don’t see it in the designer. Now, as I add the UI portions, I need some kind of placeholders.

Ideally I could copy/paste runtime objects into the design for a placeholder.

I make extensive use of OnDrawGizmos… super simple to make a bunch of shapes and drop them in the scene, they just go away at runtime.

1 Like

Great! Gizmos look like what I need, thanks.

1 Like

Awesome… they really are a super-simple way to extend the editor visualization.

It really gets crazy when you put your gizmo on a GameObject that has a bunch of children, such as a something like a PatrolPath that has a bunch of child GameObjects defining the Waypoints of that path.

You’re welcome to check out an example of that here:

https://gist.github.com/kurtdekker/c2246d3780b93fe4e023695eb947e85d

The possibilities are endless… Unity3D is a beast.

I almost forgot… I use this pattern a lot: I actually put extra stuff, line renderers, boxes, volumes whatever, sometimes with transparent or labeling markers in my scene, and then I mark all those objects with a script that Destroys them on awake. Sure they use a little memory and loading time but its a tiny fraction of the entire game scene, like it doesn’t even show up in the rounding errors.

using UnityEngine;

// @kurtdekker - Attach this script to GameObjects you
// want to have in your scene for alignment and design,
// but you want to be destroyed during real gameplay.

public class DestroyOnAwake : MonoBehaviour
{
    void Awake()
    {
        // and you can comment this out and run and you will have
        // all your guides still in project at runtime!!
        Destroy(gameObject);
    }
}