Description
The GetParentSession
method of the SceneEditorSession
class is used to retrieve the parent editor session if the current session is a game session. This is useful in scenarios where you need to access the overarching editor session that encompasses the current game session.
Usage
To use the GetParentSession
method, simply call it on an instance of SceneEditorSession
. This method does not take any parameters and returns an instance of SceneEditorSession
representing the parent session.
Example
// Assume 'currentSession' is an instance of SceneEditorSession
Editor.SceneEditorSession parentSession = currentSession.GetParentSession();
if (parentSession != null)
{
// Do something with the parent session
parentSession.BringToFront();
}