Phase 5 updates

Phase 5 · Slice 6 ·

UI input

  • UnityEngine.EventSystems in the UI assembly:
    • EventSystem, the event data (PointerEventData, AxisEventData), every handler interface, ExecuteEvents and EventTrigger;
    • GraphicRaycaster, PhysicsRaycaster and Physics2DRaycaster, with hits sorted as Unity sorts them;
    • pointer handling shared by StandaloneInputModule (legacy Input) and the Input System's InputSystemUIInputModule:
      • hover by common ancestor; press with selection;
      • click, drop, drag past the threshold;
      • scroll, and keyboard navigation, submit and cancel.
  • Selectable, with color tint (faded in unscaled time), sprite swap, animation triggers and automatic or explicit navigation. Also Button, Toggle, ToggleGroup and Slider.
  • UnityEvent persistent calls: inspector-set listeners of every argument kind, running before script listeners; property setters such as GameObject.SetActive work too.
  • Canvas renderers get their depth (draw order) when the frame draws, as raycasts need. Also RectTransformUtility, Plane and Physics2D.GetRayIntersection(All).
  • Transform.SetParent sends OnBeforeTransformParentChanged, OnTransformParentChanged, OnCanvasHierarchyChanged and OnTransformChildrenChanged.
  • A new ui_events scenario loads a Unity scene and drives a mouse over a button, a toggle and a slider. It covers the following, and matches exactly in both runs:
    • the EventSystem with the Input System module, and a button with persistent calls;
    • raycasts (raycastTarget, CanvasGroup), the order of every pointer event, selection, tints, persistent calls, dragging, track clicks, scrolling and device removal.
    • Click counts aren't compared: Unity counts double clicks in real time. 33 scenarios pass.
  • An MCP e2e test clicks a button by injected input through each input module.
  • Not yet: ScrollRect, Scrollbar, InputField, Dropdown, Mask and RectMask2D, touch and multiple pointers, and input actions of a project's own for the UI module.
  • Next: rendering (shadows, PBR closer to URP), then the rest of uGUI's controls (ScrollRect, InputField, Dropdown, masks).