Phase 5 updates

Phase 5 · Slice 3 ·

UGUI layout

  • RectTransform in CoreModule; it takes the Transform's place on the same native transform when added, as in Unity.
    • Anchors, pivot, size delta, anchored position and offsets, with the local x/y derived from them. Layout edits and parent resizes keep anchored positions; setting localPosition changes the anchored position.
    • Also SetSizeWithCurrentAnchors, SetInsetAndSizeFromParentEdge, and local and world corners.
  • Canvas: a screen-space root canvas is sized to the screen over its scale factor at the end of every frame. That's also when canvases update and dirty layouts rebuild.
  • Also CanvasRenderer, CanvasGroup, RectOffset, TextAnchor, and the driven-properties tracker.
  • UnityEngine.UI, Tassix's own assembly with the package's name, referenced by name or by the package asmdef's GUID:
    • UIBehaviour, the layout interfaces, LayoutElement, LayoutUtility, LayoutRebuilder;
    • horizontal, vertical and grid layout groups, ContentSizeFitter, AspectRatioFitter, CanvasScaler.
  • A new ui_layout scenario recorded in Unity checks the rect math, layout groups with flexible and expanded children, grids, a fitted vertical group and CanvasScaler. It matches exactly.
  • Unity scenes import RectTransform documents and UI components. unity_import covers a world-space canvas with a laid-out panel, directly and through the editor form, where a RectTransform is a component. Saving writes edited rects back.
  • CoreModule gained GetComponents(Type) and Screen.dpi. 30 scenarios pass.
  • Next: drawing UI (Image, RawImage, Text and TextMeshPro, with a UI pass in the renderer), then EventSystem raycasts and input, and Button, Toggle and Slider with UnityEvent persistent calls.