- Home /
Question by
S_Darkwell · Mar 08, 2016 at 02:21 PM ·
editorinspectoreditor-scriptingundohideflags
How to record hideFlags for Undo/Redo
Greetings!
Thank you in advance for your help.
How do you record a GameObject's hideFlag state change in the Undo/Redo system?
I have tried both Undo.RecordObject and Undo.RegisterCompleteObjectUndo, to no avail. I'm familiar with the Undo system and have recorded other actions without issue, but .hideFlag states appear to be different.
Again, thank you so much. Be well! - S.
Comment
I'm also interested in an answer to this question. It seems as if the depreciated method 'RegisterSceneUndo' accounts for hideflags, but none of the new methods do.
In Unity 2021, RegisterSceneUndo doesn't record changes to hideFlags, but another deprecated method called RegisterUndo does.