SceneCamera Camera { get; set; }

robot_2Generated
code_blocksInput

Description

The Camera property of the Editor.EditorTool class provides access to the Sandbox.SceneCamera associated with the editor tool. This camera is used to render the scene view within the editor, allowing for manipulation and visualization of the scene from different perspectives.

Usage

To use the Camera property, you can access it directly from an instance of Editor.EditorTool. This property is read-only and provides the current scene camera being used by the editor tool.

Example

// Example of accessing the Camera property
Editor.EditorTool myTool = new Editor.EditorTool();
Sandbox.SceneCamera sceneCamera = myTool.Camera;

// Use the sceneCamera to manipulate the view
sceneCamera.Position = new Vector3(0, 0, 10);
sceneCamera.Rotation = Rotation.FromAxis(Vector3.Up, 45);