Repository navigation
v0.1.0
First release. The code was developed inside com.gdk.core on the feat/uitk-migration
branch and extracted here — not unchanged: every file referenced the host framework,
and severing those references is most of what this release is. See "Changed on extraction"
below for what that cost.
Added
- A standalone UI Toolkit screen layer. Screens are UXML documents parented into a
UIDocument's visual tree.BaseUIToolkitView,UIToolkitViewFactory,
VisualElementViewLayer. - Its own contracts, in
Runtime/Core/:IUIToolkitView(the view lifecycle),
IViewLayer/IViewSurface(where a view lives and how it moves),
IVisualTreeAssetLoader(one method — the host supplies the asset pipeline), and
IPresenterInstantiator(the collection adapters' presenter factory). RootUIDocumentplus the default three-layerRootUIDocument.uxml, and aLayers
value carrying the Screen / Hidden / Overlay layers as one thing.- Collection adapters — list, grid and multi-template — with
IUIToolkitItemView,
BaseUIToolkitItemViewandBaseUIToolkitItemPresenter. SafeAreaElement/SafeAreaCalculator— notch handling. Insets are applied as
layout, either as padding or as absolute edges. Note that
PanelSettings.SetScreenToPanelSpaceFunctionis deliberately NOT used: it is present in
6000.3.9f1, but it transforms pointer coordinates, so driving a safe area through it
would move where clicks land without moving any layout.PanelScaleRatio— theCanvasScaler-equivalent aspect-ratio rule, applied to
PanelSettings. It clones the settings asset by default, becausePanelSettingsis a
shared project asset and writing to it at runtime is a source-control diff rather than a
runtime tweak.BackNavigationSource— raises a C# event onNavigationCancelEvent, covering
Escape, gamepad B and the Android back button.- A VContainer registration, in its own assembly. See Dependencies below — it began
as an optional, gated assembly and is not one any more. - A
Notification Popupsample and 113 PlayMode tests.
Dependencies
- VContainer is required, not optional.
jp.hadashikick.vcontaineris a real dependency
and the registration assembly is no longer gated behind aGDK_VCONTAINERversionDefine
plus a matchingdefineConstraints. The project standardises on VContainer for all
dependency injection, so a host without a container is not a supported configuration — and
the gate was an assembly-level branch that nothing exercised.Cuvara.UIToolkit.VContainer
stays a separate assembly for direction rather than for gating: it may reference the view
and manager types, and they may not reference it, which is what keeps a container reference
out of the view layer. com.cysharp.unitaskandcom.unity.modules.uielementsare the other two. All three
resolve from a registry, so the package installs from its own declarations — the OpenUPM
scoped registry forcom.cysharpandjp.hadashikickis the consuming project's to add,
because a UPM package cannot declare a scoped registry of its own.
Changed on extraction
Every one of these was a reference to com.gdk.core that had to be severed, not a
refactor for its own sake:
ISurfaceScreenView/IScreenViewBase→IUIToolkitView. The host contract required a
RectTransformand anIsReadyToUseflag; aVisualElementhas noTransform, and
CloneTreeis synchronous so there is no "not ready yet" window to flag.IViewLayer/IViewSurfaceare now DEFINED here. The host deleted its copies and
consumes these, so there is one definition rather than two.IAssetsManager→IVisualTreeAssetLoader. The host's loader comes from an OpenUPM
scoped registry, and a UPM package cannot declare a scoped registry of its own — so that
dependency could never have resolved for a consumer installing from a git URL.- The collection adapters'
IDependencyContainer, resolved through a static service
locator, →IPresenterInstantiatorpassed in. That locator was both a dependency and the
reason those adapters could not be exercised without a live scene. SignalBus→ plain C# events.ILoggerManager→UnityEngine.Debug.- Namespaces
GameFoundation.Scripts.UIModule.UITK.*→Cuvara.UIToolkit.*; assemblies
GameFoundation.UIModule.UITK→Cuvara.UIToolkit.
Deliberately not here
UIToolkitScreenViewBackend, BaseUIToolkitScreenPresenter,
BaseUIToolkitPopupPresenter, the notification popup presenter, and the back-navigation
policy all stayed in com.gdk.core. Each one exists to bind this package to that
framework — it implements IScreenViewBackend, or takes a SignalBus, or decides what
Back closes. Moving them here would have re-created the dependency this package exists to
remove. A CI gate (.github/scripts/check_standalone.py) fails the build if any of those
host symbols reappears under Runtime/ or Tests/.