ドキュメント

Unity Engine

Unity Engine

MarkSceneDirty()

Explicitly mark the current opened Scene as modified.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
注意
Deprecated. Use EditorSceneManager.MarkSceneDirty or EditorSceneManager.MarkAllScenesDirty
public static void MarkSceneDirty()

Remarks

Normally, an operation resulting in a Scene file change should register itself with the undo system, which automatically handles Scene dirty state tracking. However, if for whatever reason you can't make the operation undoable, you can use this function to explicitly mark the Scene as modified, so that the user will be prompted to save the Scene when it's being closed.