bool IsMainCamera { get; set; }

book_4_sparkGenerated
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. This can be useful for managing camera views and ensuring that the correct camera is used for rendering the primary 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 render specific elements
}