static bool RenderToPixmap( SceneCamera camera, Pixmap targetPixmap, bool async )
static bool RenderToPixmap( CameraComponent camera, Pixmap targetPixmap, bool async )
static bool RenderToPixmap( Scene scene, Pixmap targetPixmap, bool async )

robot_2Generated
code_blocksInput

Description

The RenderToPixmap method is a static extension method provided by the SandboxToolExtensions class. It allows rendering the view from a specified SceneCamera to a Pixmap object. This method can be executed asynchronously if specified.

Usage

To use the RenderToPixmap method, you need to have a SceneCamera and a Pixmap object ready. You can specify whether the rendering should be done asynchronously by setting the async parameter to true or false.

Example usage:

SceneCamera camera = new SceneCamera();
Editor.Pixmap pixmap = new Editor.Pixmap();
bool async = false;

bool result = SandboxToolExtensions.RenderToPixmap(camera, pixmap, async);

If async is set to true, the method will perform the rendering operation asynchronously, which can be useful for non-blocking operations in your application.

Example

SceneCamera camera = new SceneCamera();
Editor.Pixmap pixmap = new Editor.Pixmap();
bool async = false;

bool result = SandboxToolExtensions.RenderToPixmap(camera, pixmap, async);

if (result)
{
    // Rendering was successful
}
else
{
    // Handle rendering failure
}