Table of Contents

Class SceneViewElement

Namespace
Velvet
Assembly
Velvet.Docs.dll

The element behind SceneView(Camera?, string?, string?, string?, float, StyleOverrides?, Func<VisualElement, Action>?, string?, string?, string?, IReadOnlyDictionary<string, string>?, IReadOnlyDictionary<string, string>?): displays a Camera's output as its background image, from a framework-owned RenderTexture sized to the element's laid-out rect. A dedicated subclass (rather than reusing another element type) so a type change to or from any other element remounts instead of patching, and so the element is never recycled through the shared primitive pools while it owns a live RenderTexture. While the camera texture is live it owns the element's backgroundImage: every other writer routes through Velvet.SceneViewElement.WriteBackground(UnityEngine.UIElements.VisualElement, UnityEngine.UIElements.StyleBackground), which defers the value instead of clobbering the feed and restores it when the camera releases.

public sealed class SceneViewElement : VisualElement
Inheritance
object
CallbackEventHandler
Focusable
VisualElement
SceneViewElement