Search Unity

HideFlags.DontSaveInEditor causes objects not to update

Discussion in 'Scripting' started by Magister, Aug 20, 2018.

  1. Magister

    Magister

    Joined:
    Mar 29, 2013
    Posts:
    34
    I have a script made to be used in the editor. You click a button in the inspector and it generates some temporary objects. These objects have HideFlags.DontSaveInEditor applied to them. There are additional buttons for enabling and disabling these objects, but clicking on the buttons doesn't quite work. It does enable/disable them, but you don't actually see that take effect in the game window until you click on and off the object in the hierarchy view. If I remove the HideFlags.DontSaveInEditor then everything works as intended except of course that the objects dirty the scene and get saved out when I don't want them to.

    Has anyone else encountered weird behavior with HideFlags.DontSaveInEditor? Is this a bug and/or is there a work around?
     
  2. Waffle1434

    Waffle1434

    Joined:
    Jun 1, 2016
    Posts:
    5
    I'm having this exact same issue.