Description
The Focus
method is a public instance method of the HammerSceneEditorSession
class within the Editor.MapEditor
namespace. This method is used to bring the current Hammer scene editor session into focus, making it the active session in the editor environment. This can be particularly useful when working with multiple sessions and needing to switch attention to a specific one.
Usage
To use the Focus
method, you must have an instance of the HammerSceneEditorSession
class. Once you have the instance, simply call the method to focus the session:
var session = new HammerSceneEditorSession();
session.Focus();
This will make the session the active one in the editor, allowing you to interact with it directly.
Example
// Example of using the Focus method
// Assume 'session' is an instance of HammerSceneEditorSession
HammerSceneEditorSession session = new HammerSceneEditorSession();
// Focus the session
session.Focus();
// Now the session is the active one in the editor environment.