bool IsMainCamera { get; set; }

robot_2Generated
code_blocksInput

Description

The IsMainCamera property of the CameraComponent class indicates whether the current camera is the main game camera. This property returns a boolean value, where true signifies that the camera is the main camera, and false indicates otherwise.

Usage

Use the IsMainCamera property to determine if a particular camera is set as the main camera in your game scene. This can be useful for managing camera views and ensuring that the correct camera is used for rendering the main scene.

Example

// Example of checking if a camera is the main camera
CameraComponent camera = new CameraComponent();

if (camera.IsMainCamera)
{
    // Perform actions specific to the main camera
    // For example, adjust settings or apply effects
}