Class IMGUIContainer
Element that draws IMGUI content.
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public class IMGUIContainer : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IDisposable
Constructors
IMGUIContainer()
Constructor.
Declaration
public IMGUIContainer()
IMGUIContainer(Action)
Constructor.
Declaration
public IMGUIContainer(Action onGUIHandler)
Parameters
Type | Name | Description |
---|---|---|
Action | onGUIHandler | The function assigned to onGUIHandler. |
Fields
ussClassName
USS class name of elements of this type.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
String |
Properties
canGrabFocus
Declaration
public override bool canGrabFocus { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
contextType
ContextType of this IMGUIContrainer. Currently only supports ContextType.Editor.
Declaration
public ContextType contextType { get; set; }
Property Value
Type | Description |
---|---|
ContextType |
cullingEnabled
When this property is set to true, onGUIHandler is not called when the Element is outside the viewport.
Declaration
public bool cullingEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
onGUIHandler
The function that's called to render and handle IMGUI events.
Declaration
public Action onGUIHandler { get; set; }
Property Value
Type | Description |
---|---|
Action |
Remarks
This is assigned to onGUIHandler and is similar to
Methods
Dispose()
Releases the native memory that this IMGUIContainer instance uses.
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposeManaged)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposeManaged |
DoMeasure(Single, VisualElement.MeasureMode, Single, VisualElement.MeasureMode)
Declaration
protected override Vector2 DoMeasure(float desiredWidth, VisualElement.MeasureMode widthMode, float desiredHeight, VisualElement.MeasureMode heightMode)
Parameters
Type | Name | Description |
---|---|---|
Single | desiredWidth | |
VisualElement.MeasureMode | widthMode | |
Single | desiredHeight | |
VisualElement.MeasureMode | heightMode |
Returns
Type | Description |
---|---|
Vector2 |
Overrides
ExecuteDefaultAction(EventBase)
Declaration
protected override void ExecuteDefaultAction(EventBase evt)
Parameters
Type | Name | Description |
---|---|---|
EventBase | evt |
Overrides
HandleEvent(EventBase)
Declaration
public override void HandleEvent(EventBase evt)
Parameters
Type | Name | Description |
---|---|---|
EventBase | evt |
Overrides
MarkDirtyLayout()
Marks layout as dirty to trigger a redraw.
Declaration
public void MarkDirtyLayout()