CaptureToPNG(VisualElement, string)
Renders the element's panel, captures the visual content of element, and saves it to disk as a PNG file.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Method
- Namespace: UnityEditor.UIElements
- Assembly: UnityEditor
public static void CaptureToPNG(this VisualElement element, string path)
Parameters
The element to capture. It must belong to a panel.
The destination file path. This function creates the directory if it does not exist.
Remarks
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.