ドキュメント

Unity Engine

Unity Engine

CaptureToRenderTexture(VisualElement)

Renders the element's panel and captures the visual content of element into a new RenderTexture sized to the element's pixel bounds.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public static RenderTexture CaptureToRenderTexture(this VisualElement element)

Parameters

The element to capture. It must belong to a panel.

Returns

Type

Description

RenderTextureA new RenderTexture scaled according to the panel. The caller owns the returned texture and is responsible for releasing it with RenderTexture.Release.

Remarks

This method repaints the whole panel before it captures content.