Class EditorPanelSimulator
A PanelSimulator with a default EditorPanel.
Implements
Inherited Members
Namespace: UnityEditor.UIElements.TestFramework
Assembly: Unity.UI.TestFramework.Editor.dll
Syntax
public sealed class EditorPanelSimulator : PanelSimulator, IDisposable
Constructors
EditorPanelSimulator()
Creates a new Editor UIToolkit Panel.
Declaration
public EditorPanelSimulator()
Properties
panelSize
The size of the root VisualElement of the panel.
Declaration
public Vector2 panelSize { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Methods
ApplyPanelSize()
Apply the m_PanelSize size to the panel.
Declaration
public void ApplyPanelSize()
CreatePanel()
Creates the Panel and initializes the rootVisualElement.
Declaration
public void CreatePanel()
Dispose()
Disposes of the panel and releases its resources.
Declaration
public void Dispose()
FrameUpdate(double)
Performs a frame update of the panel.
Declaration
public override sealed void FrameUpdate(double time)
Parameters
| Type | Name | Description |
|---|---|---|
| double | time | The amount of time in seconds to increment the simulated time. |
Overrides
Remarks
This method simulates yielding a frame by the following:
- Updates the scheduler and the panel's visual tree updaters.
- Advances the time by the amount specified in time.
- When needsRendering is true, it triggers rendering for the panel's `ImmediateModeElement` and invokes `IMGUIContainer`'s `OnGUI` with a Repaint Event.
See Also
RecreatePanel()
Recreates the panel.
Declaration
public void RecreatePanel()
ReleasePanel()
Disposes of the panel and releases its resources.
Declaration
public void ReleasePanel()