Class EditorWindowPanelSimulator
A PanelSimulator accessing an EditorWindow's panel. Allows for the simulation of time passing, sending events, and updating the panel in a synchronous manner.
Inherited Members
Namespace: UnityEditor.UIElements.TestFramework
Assembly: Unity.UI.TestFramework.Editor.dll
Syntax
public sealed class EditorWindowPanelSimulator : PanelSimulator
Constructors
EditorWindowPanelSimulator(EditorWindow)
Sets up the provided window for simulation.
Declaration
public EditorWindowPanelSimulator(EditorWindow window)
Parameters
| Type | Name | Description |
|---|---|---|
| EditorWindow | window | The |
Properties
window
EditorWindow tied to the panel.
Declaration
public EditorWindow window { get; }
Property Value
| Type | Description |
|---|---|
| EditorWindow |
Methods
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:
- Advances the panel's time by the specified
time. - Updates the panel's scheduler and visual tree updaters.
- If needsRendering is true, triggers rendering for the panel's
ImmediateModeElementand invokesIMGUIContainer'sOnGUIwith a Repaint Event.
See Also
SetWindow(EditorWindow)
Assigns the specified window to the EditorWindowPanelSimulator.
Declaration
public void SetWindow(EditorWindow window)
Parameters
| Type | Name | Description |
|---|---|---|
| EditorWindow | window | The |