Class ImmediateModeElement
VisualElement that can implement custom immediate mode rendering.
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public abstract class ImmediateModeElement : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle
Remarks
To use this element, create a new element inheriting from this type and override the ImmediateRepaint method.
Constructors
ImmediateModeElement()
Constructor.
Declaration
public ImmediateModeElement()
Properties
cullingEnabled
When this property is set to true, the Element does not repaint itself when it is outside the viewport.
Declaration
public bool cullingEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
ImmediateRepaint()
Invoked during the repaint phase.
Declaration
protected abstract void ImmediateRepaint()
Remarks
Here it is safe to use any rendering calls using the immediate Graphics api, eg: Graphics.DrawTexture(contentRect, image); Graphics.DrawMesh, etc The current transform matrix is set up so (0,0) correspond to the top-left corner of the element. For IMGUI usage, please use the IMGUIContainer element.