Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

VisualElementCaptureExtensions

class in UnityEngine.UIElements

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Use these extension methods to capture the rendered visual content of a VisualElement into a RenderTexture.

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.

Static Methods

Method Description
CaptureIntoRenderTexture Renders the element's panel and captures the visual content of into the supplied .
CaptureToRenderTexture Renders the element's panel and captures the visual content of into a new RenderTexture sized to the element's pixel bounds.
TryCaptureIntoRenderTexture Renders the element's panel and captures the visual content of into the supplied . Returns false when the element cannot be captured.