int Priority { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Priority property of the CameraComponent class determines the rendering order of cameras in a scene. A higher priority value means that the camera will be rendered on top of others with lower priority values. This property is useful for managing multiple cameras in a scene and ensuring that the desired camera view is displayed.

Usage

To set the priority of a camera, simply assign an integer value to the Priority property. The value should be within the range specified by the RangeAttribute, which is from 1 to 16. This range ensures that the priority is set to a meaningful level without exceeding the limits.

Example

// Example of setting the priority of a camera component
CameraComponent camera = new CameraComponent();
camera.Priority = 10; // Sets the camera's priority to 10, ensuring it renders above cameras with lower priority values.