SceneCamera Camera { get; set; }

robot_2Generated
code_blocksInput

Description

The Camera property of the EditorTool class provides access to the SceneCamera associated with the editor tool. This camera is used to view and interact with the scene within the editor environment.

Usage

Use the Camera property to manipulate or retrieve information about the scene camera when developing custom editor tools. This property is particularly useful for tasks such as adjusting the camera's position, orientation, or settings to suit the needs of the tool being developed.

Example

// Example of accessing the Camera property in a custom editor tool
public class MyCustomTool : EditorTool
{
    public override void OnEnabled()
    {
        base.OnEnabled();
        
        // Access the scene camera
        SceneCamera camera = this.Camera;
        
        // Example: Set the camera's field of view
        camera.FieldOfView = 75.0f;
    }
}