bool HasUnsavedChanges { get; set; }

robot_2Generated
code_blocksInput

Description

The HasUnsavedChanges property of the Scene class indicates whether there are any unsaved changes in the current scene. This property is marked as obsolete, and it is recommended to use Scene.Editor.HasUnsavedChanges instead for checking unsaved changes in the editor context.

Usage

To check if there are unsaved changes in a scene, you should use the Scene.Editor.HasUnsavedChanges property instead of Scene.HasUnsavedChanges as the latter is obsolete.

Example

// Example of using the recommended property
if (scene.Editor.HasUnsavedChanges)
{
    // Handle unsaved changes
    // e.g., prompt the user to save changes
}