docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class EditorPanelSimulator

    A PanelSimulator with a default EditorPanel.

    Inheritance
    object
    PanelSimulator
    EditorPanelSimulator
    Implements
    IDisposable
    Inherited Members
    PanelSimulator.panel
    PanelSimulator.rootVisualElement
    PanelSimulator.currentTimeMs
    PanelSimulator.currentTime
    PanelSimulator.timePerSimulatedFrameMs
    PanelSimulator.timePerSimulatedFrame
    PanelSimulator.ResetTimePerSimulatedFrameToDefault()
    PanelSimulator.pixelsPerPoint
    PanelSimulator.panelName
    PanelSimulator.GetDefaultPanelSize()
    PanelSimulator.IncrementCurrentTimeMs(long)
    PanelSimulator.IncrementCurrentTime(double)
    PanelSimulator.ResetCurrentTime()
    PanelSimulator.needsRendering
    PanelSimulator.FrameUpdate()
    PanelSimulator.FrameUpdateMs(long)
    PanelSimulator.KeyPress(KeyCode, EventModifiers)
    PanelSimulator.ReturnKeyPress(EventModifiers)
    PanelSimulator.KeypadEnterKeyPress(EventModifiers)
    PanelSimulator.TabKeyPress(EventModifiers)
    PanelSimulator.TypingText(string, bool)
    PanelSimulator.KeyDown(KeyCode, EventModifiers)
    PanelSimulator.KeyUp(KeyCode, EventModifiers)
    PanelSimulator.Click(VisualElement, MouseButton, EventModifiers)
    PanelSimulator.Click(Vector2, MouseButton, EventModifiers)
    PanelSimulator.DoubleClick(VisualElement, MouseButton, EventModifiers)
    PanelSimulator.DoubleClick(Vector2, MouseButton, EventModifiers)
    PanelSimulator.DragAndDrop(Vector2, Vector2, MouseButton, EventModifiers)
    PanelSimulator.MouseDown(VisualElement, MouseButton, EventModifiers)
    PanelSimulator.MouseDown(Vector2, MouseButton, EventModifiers)
    PanelSimulator.MouseUp(VisualElement, MouseButton, EventModifiers)
    PanelSimulator.MouseUp(Vector2, MouseButton, EventModifiers)
    PanelSimulator.MouseMove(Vector2, Vector2, EventModifiers)
    PanelSimulator.MouseMove(Vector2, EventModifiers)
    PanelSimulator.ScrollWheel(Vector2, Vector2)
    PanelSimulator.ExecuteCommand(string)
    PanelSimulator.ValidateCommand(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    PanelSimulator.FrameUpdate(double)
    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
    FrameUpdate()
    FrameUpdateMs(long)

    RecreatePanel()

    Recreates the panel.

    Declaration
    public void RecreatePanel()

    ReleasePanel()

    Disposes of the panel and releases its resources.

    Declaration
    public void ReleasePanel()

    Implements

    IDisposable
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)