Skip to main content

HideFlags

Bit mask that controls object destruction, saving and visibility in inspectors. Unity HideFlags

Elements

ElementDescription
HideFlags.DontSaveThe object will not be saved to the Scene. It will not be destroyed when a new Scene is loaded. It is a shortcut for HideFlags.DontSaveInBuild
HideFlags.DontSaveInBuildThe object will not be saved when building a player.
HideFlags.DontSaveInEditorThe object will not be saved to the Scene in the editor.
HideFlags.DontUnloadUnusedAssetThe object will not be unloaded by Resources.UnloadUnusedAssets.
HideFlags.HideAndDontSaveThe GameObject is not shown in the Hierarchy, not saved to to Scenes, and not unloaded by Resources.UnloadUnusedAssets.
HideFlags.HideInHierarchyThe object will not appear in the hierarchy.
HideFlags.HideInInspectorIt is not possible to view it in the inspector.
HideFlags.NoneA normal, visible object. This is the default.
HideFlags.NotEditableThe object is not be editable in the inspector.