VisualElementCaptureExtensions
Use these extension methods to capture the rendered visual content of a VisualElement into a RenderTexture.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
public static class VisualElementCaptureExtensions
Remarks
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.
The content of an IMGUIContainer is captured only when you call the capture method from within IMGUI event processing in the Editor, for example from an OnGUI callback. In any other context, the IMGUIContainer's content is blank in the result.
Static Methods
Method | Description |
|---|---|
| CaptureIntoRenderTexture | Renders the element's panel and captures the visual content of |
| CaptureToRenderTexture | Renders the element's panel and captures the visual content of |
| TryCaptureIntoRenderTexture | Renders the element's panel and captures the visual content of |