Version: 2022.1
언어: 한국어

EnterPlayModeOptions.DisableSceneBackupUnlessDirty

매뉴얼로 전환

설명

When enabled, this reduces the time taken to enter play mode by only backing up scenes marked dirty, but can result in data loss in certain situations.

By default this option is disabled, which means Unity always saves a backup of the open scenes to disk when entering play mode, regardless of the scene's "dirty" value.

Unity does this as a safety measure because there are some situations where the scene can be modified without the dirty flag being set, for example if you use an editor script to create a GameObject or Component without calling EditorSceneManager.MarkSceneDirty.

If you enable this option, when entering play mode, Unity only saves backups of open scenes with the dirty flag set. This can make it faster to enter play mode, but you should only enable it if you are sure you are not using Editor scripts or custom tools which modify the scene without calling EditorSceneManager.MarkSceneDirty, otherwise those modifications will be lost.

For more information about the options available for entering play mode, see the Configurable Enter Play Mode page in the User Manual.