Description
The CurrentSession
property of the EditorToolManager
class provides access to the current SceneEditorSession
being used in the editor. This session encapsulates the state and context of the scene being edited, allowing tools and components to interact with the scene effectively.
Usage
To access the current scene editor session, simply use the CurrentSession
property of the EditorToolManager
instance. This property is particularly useful when you need to perform operations that are specific to the current editing session, such as querying or modifying scene elements.
Example
// Example of accessing the current scene editor session
EditorToolManager toolManager = new EditorToolManager();
SceneEditorSession currentSession = toolManager.CurrentSession;
// Use the currentSession to perform operations
if (currentSession != null)
{
// Perform operations with the current session
// For example, accessing scene objects or modifying properties
}