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 used for rendering the scene.
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 used for rendering the scene.
Use the IsMainCamera
property to determine if a particular camera is set as the main camera in your game. This can be useful for logic that depends on the main camera, such as rendering effects or camera-specific behaviors.
// 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, apply main camera effects or settings }