Class CaptureRenderTexture
Capture class for capturing RenderTexture contents.
Inherited Members
Namespace: Unity.SimulationPro
Assembly: Unity.SimulationPro.Capture.dll
Syntax
public static class CaptureRenderTexture
Methods
Capture(RenderTexture, Func<AsyncRequest<object>, Result>)
Asynchronously reads back the contents of the given RenderTexture and invokes the completion functor with the raw byte data. Falls back to synchronous readback when async GPU readback is not available on the current platform.
Declaration
public static AsyncRequest<object> Capture(RenderTexture src, Func<AsyncRequest<object>, AsyncRequest.Result> functor = null)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTexture | src | RenderTexture to capture. |
| Func<AsyncRequest<object>, AsyncRequest.Result> | functor | Completion functor for handling the captured data. The object passed is a byte[] of the captured data. |
Returns
| Type | Description |
|---|---|
| AsyncRequest<object> | AsyncRequest<object> |