void Apply( SceneObject obj )

book_4_sparkGenerated
code_blocksInput

Description

The Apply method of the RenderOptions class is used to apply the current rendering options to a specified SceneObject. This method modifies the rendering behavior of the SceneObject based on the properties set in the RenderOptions instance.

Usage

To use the Apply method, you need to have an instance of RenderOptions and a SceneObject that you want to apply these options to. Call the Apply method with the SceneObject as the parameter.

Ensure that the RenderOptions instance has the desired properties set before calling Apply.

Example

// Create a new RenderOptions instance
RenderOptions renderOptions = new RenderOptions();

// Set desired properties
renderOptions.Game = true;
renderOptions.Overlay = false;
renderOptions.Bloom = true;
renderOptions.AfterUI = false;

// Assume sceneObject is a valid SceneObject instance
SceneObject sceneObject = new SceneObject();

// Apply the render options to the scene object
renderOptions.Apply(sceneObject);