Search Unity

Resolved Use Projector in Custom Editor

Discussion in 'Immediate Mode GUI (IMGUI)' started by BoltScripts, Jan 8, 2022.

  1. BoltScripts

    BoltScripts

    Joined:
    Feb 12, 2015
    Posts:
    20
    It's a simple question but one that I'm not sure how you'd go about.
    I just want to be able to use a projector (or any object really) without creating it as part of the scene.
    I basically want to create a hidden object that I can manipulate with my inspector code.
    The purpose being to create a highlight where the mouse is for painting.
    This is the best way I could think of to do it but again I'm not sure how you'd create such an object for internal use only.
     
  2. BoltScripts

    BoltScripts

    Joined:
    Feb 12, 2015
    Posts:
    20
    Managed to find what I need after another round of googling.
    You just want to set the hideflags on the gameobject to HideAndDontSave.
    Makes sense but I'd somehow never encountered or noticed the hideflags in all my years of unity, heh.

    But this was hard to find just from googling. Only found it through an adjacently related question by luck.
    Maybe this will help someone in the future.