Use these extension methods to capture the rendered visual content of a VisualElement into a RenderTexture.
You can capture elements that are part of an editor panel or a runtime panel, except if the element draws directly into a camera (for example, a world space runtime panel). These methods render the whole panel, so any elements drawn on top of the captured element are reflected in the result.
| Method | Description |
|---|---|
| CaptureIntoRenderTexture | Renders the element's panel and captures the visual content of into the supplied . |
| CaptureToRenderTexture | Renders the element's panel and captures the visual content of into a new RenderTexture sized to the element's pixel bounds. |
| TryCaptureIntoRenderTexture | Renders the element's panel and captures the visual content of into the supplied . Returns false when the element cannot be captured. |