Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Flag object to be ignored on play for unity level editing.

Discussion in 'Editor & General Support' started by rorylane, May 27, 2015.

  1. rorylane

    rorylane

    Joined:
    Apr 10, 2013
    Posts:
    22
    Hi all.

    Is it possible to flag objects to truly be ignored on play.

    In level editing, it is often helpful to have objects exist as placeholders and visual guides. In unity you can disable objects, but they still exist in the overall scene hierarchy.

    Is there a way to flag a gameobject to be completely ignored so it does not exist in any way in the executed application?

    Thanks
     
  2. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,980
  3. rorylane

    rorylane

    Joined:
    Apr 10, 2013
    Posts:
    22
  4. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,980
    Yes. So if you probably want gizmos then. They will display in both edit and play mode (but only in editor). Alternately you could use the above to destroy a list of objects, but that is the long way around.
     
  5. rorylane

    rorylane

    Joined:
    Apr 10, 2013
    Posts:
    22
    Thanks zombie gorilla. I'll look into creating custom gizmos. I don't think destroy on play would work too well because I believe the game would still need to allocate memory for the items.

    Anyway, I'll look into the gizmo angle. Thanks.