Description
The All
property provides a static list of all active SceneEditorSession
instances. This list includes every scene editor session that is currently open and being managed by the editor. It is useful for iterating over all sessions to perform operations or checks across multiple scenes.
Usage
Use the All
property when you need to access or manipulate all currently open scene editor sessions. This can be particularly useful in scenarios where you need to apply changes or gather information from multiple scenes at once.
Example
// Example: Iterating over all SceneEditorSessions
foreach (var session in SceneEditorSession.All)
{
if (session.HasUnsavedChanges)
{
// Perform an action, such as prompting the user to save changes
session.Save(false);
}
}