CameraComponent Camera { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Camera property of the PostProcess class represents the camera component to which post-processing effects are applied. This property is essential for linking the post-processing effects to a specific camera within the scene.

Usage

To use the Camera property, you must first ensure that a CameraComponent is available in your scene. The PostProcess component requires this camera to apply visual effects. You can set this property to the desired camera component to enable post-processing effects on that camera.

Example

// Assuming you have a PostProcess component and a CameraComponent in your scene
var postProcess = new PostProcess();
var cameraComponent = new CameraComponent();

// Assign the camera component to the PostProcess
postProcess.Camera = cameraComponent;

// Now, any post-processing effects added to postProcess will affect the cameraComponent