System.Action OnRenderUI { get; set; }

robot_2Generated
code_blocksInput

Description

The OnRenderUI property of the SceneCamera class is an event that is triggered during the UI rendering phase of the camera's rendering process. This property allows you to attach custom actions that should be executed when the camera is rendering its UI elements.

Usage

To use the OnRenderUI property, you can assign a delegate or lambda expression to it. This delegate will be called whenever the camera reaches the UI rendering stage. This is useful for adding custom UI elements or performing operations that need to occur during the UI pass.

Example

// Example of using the OnRenderUI property
SceneCamera camera = new SceneCamera();

// Assign a lambda expression to the OnRenderUI event
camera.OnRenderUI = () => {
    // Custom UI rendering logic here
    // For example, draw a custom UI element
    UI.DrawText("Hello, World!", new Vector2(100, 100), Color.White);
};