文档

Unity Engine

Unity Engine

SaveCurrentSceneIfUserWantsTo()

Ask the user if they want to save the open Scene.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
警告
Deprecated. Use EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo
public static bool SaveCurrentSceneIfUserWantsTo()

Returns

Type

Description

bool

Remarks

You might want to call this before opening another Scene or creating a new Scene. A return value of true indicates that you may continue. A return value of false indicates that the user cancelled the operation and you should not Open another Scene.