Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SaveCurrentSceneIfUserWantsTo()

Ask the user if they want to save the open Scene.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
Warning
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.