void RenderNextFrame()

book_4_sparkGenerated
code_blocksInput

Description

The RenderNextFrame method is a member of the ScenePanel class in the Sandbox.UI namespace. This method is used to schedule the panel to be rendered again in the next frame. It is particularly useful when used in conjunction with the RenderOnce property, allowing for on-demand rendering or rendering that occurs only once.

Usage

To use the RenderNextFrame method, simply call it on an instance of ScenePanel. This will ensure that the panel is rendered in the next frame, regardless of the current state of the RenderOnce property.

Example

// Create a new ScenePanel instance
ScenePanel myScenePanel = new ScenePanel();

// Set RenderOnce to true to render only once
myScenePanel.RenderOnce = true;

// Call RenderNextFrame to ensure the panel renders in the next frame
myScenePanel.RenderNextFrame();