| Parameter | Description |
|---|---|
| element | The element to capture. It must belong to a panel. |
| path | The destination file path. This function creates the directory if it does not exist. |
Renders the element's panel, captures the visual content of , and saves it to disk as a PNG file.
This method repaints the whole panel before it captures content. This method calls VisualElementCaptureExtensions.CaptureToRenderTexture, then encodes the result as a PNG, and releases the intermediate texture.