Legacy Documentation: Version 2018.2 (Go to current version)
LanguageEnglish
  • C#

HideFlags.DontSave

Description

The 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.DontSaveInEditor | HideFlags.DontUnloadUnusedAsset.

You must manually clear the object from memory using DestroyImmediate to avoid memory leaks.

Did you find this page useful? Please give it a rating: