# CaptureIntoRenderTexture(VisualElement, RenderTexture)

> Renders the element's panel and captures the visual content of element into the supplied destination.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public static void CaptureIntoRenderTexture(this VisualElement element, RenderTexture destination)
```

### Parameters

**** (\[VisualElement]\(/engine/6000.7/script-reference/unityengine/uielements/visualelement)): The element to capture. It must belong to a panel.**** (\[RenderTexture]\(/engine/6000.7/script-reference/unityengine/rendertexture)): The texture to render into. The caller owns and is responsible for releasing it. The element is captured at the panel's scale and aligned to the top-left of the texture. Content that does not fit is cropped, and any uncovered region is left transparent. On platforms without [CopyTextureSupport.Basic](/engine/6000.7/script-reference/unityengine/rendering/copytexturesupport/basic.md), the capture falls back to a blit that scales the element across the destination, so the result may be stretched and is not offset within a larger destination.

### Remarks

This method repaints the whole panel before it captures content. Use [VisualElementCaptureExtensions.TryCaptureIntoRenderTexture](/engine/6000.7/script-reference/unityengine/uielements/visualelementcaptureextensions/trycaptureintorendertexture.md) when you expect the panel is missing or draws into cameras.
