一键导入
bl-anchor-app
Use for AnchorAppBuilder hosting, AnchorSettings, PanelRenderer or UIDocument setup, services, lifecycle hooks, or UXML service ownership.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use for AnchorAppBuilder hosting, AnchorSettings, PanelRenderer or UIDocument setup, services, lifecycle hooks, or UXML service ownership.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use for Anchor AppUI adapter controls, UXML attributes, repeated-item data sources, command buttons, OptionPager, safe areas, or timers.
Use for Anchor debug-toolbar panels backed by ECS systems, ToolbarHelper, SystemObservableObject, managed AutoToolbar panels, or debug asmdefs.
Use for Anchor ObservableObject or SystemObservableObject view models, generated properties and commands, UI Toolkit bindings, or ECS-to-UI state.
Use for Anchor destinations, actions, popups, back stack, arguments, screen callbacks, saved state, or Burst navigation entry points.
| name | bl-anchor-app |
| description | Use for AnchorAppBuilder hosting, AnchorSettings, PanelRenderer or UIDocument setup, services, lifecycle hooks, or UXML service ownership. |
Use this skill for Anchor app root setup, lifecycle, settings, and services. Resolve Anchor source from the installed package root; in source checkouts this is commonly Packages/com.bovinelabs.anchor.
AnchorAppBuilder subclass, AnchorSettings, and the target assembly references first.PanelRenderer; Unity 6.3/6.4 uses UIDocument.AnchorAppBuilder directly unless the app needs custom services, a custom AnchorApp, or lifecycle hooks.OnConfigureServices for app services and call base.OnConfigureServices(services) unless intentionally replacing Anchor defaults.AnchorSettings for Views, StartDestination, Actions, Animations, Audio, DebugStyleSheets, and ToolbarOnly.OnAppInitialized and OnAppShuttingDown for app-specific startup/shutdown around the base initialization and saved navigation state.AnchorApp.Current.NavHost from managed UI code, or through AnchorNavHost.Burst from Burst-compatible paths.BovineLabs.Anchor.Tests when code changes touch package behavior; documentation-only skill edits only need skill validation.AnchorAppBuilder<T> creates the AnchorServiceProvider, creates the panel, initializes AnchorApp, attaches the app root to the host element, updates screen metrics, and disposes services on disable.PanelRenderer. The builder registers a reload callback, calls IPanelComponent.PerformValidation(true), and reattaches the app root when the panel reloads.UIDocument; the builder hosts Anchor under rootVisualElement.AnchorPanel is the default IAnchorPanel. It is AppUI-backed when UNITY_APPUI is defined and a plain VisualElement panel otherwise.ToolbarOnly skips normal navigation initialization and initializes only the toolbar.AnchorApp.Current is a managed singleton. Do not call it directly from Burst-compiled jobs except behind an established managed trampoline or [BurstDiscard] boundary.ILocalStorageService, IViewModelService, and IAudioService; IUXMLService is also registered when UXMLService is not null.[IsService] are auto-registered. Add [Transient] when each resolution should create a fresh instance.IAnchorToolbarHost are also aliased as IAnchorToolbarHost.AnchorServiceCollection using AddSingleton, AddTransient, AddSingletonInstance, or AddAlias.AnchorApp.Current.Services.GetRequiredService<T>() when absence is an invariant.AnchorSettings.Views maps destination keys to VisualTreeAssets.UXMLService.GetAsset(key) performs the settings lookup and logs through BLGlobalLogger when a key is missing.UXMLService.Instantiate(key) instantiates the asset and assigns dataSource on elements that declare data-source-type.AnchorNavHost, not UXMLService, owns screen attachment, StretchToParentSize(), and PickingMode.Ignore on created navigation items.data-source-type declarations on templates whose parent control supplies row data; AnchorGridView and AnchorAccordion set item dataSource themselves.PanelRenderer path into a UIDocument-only implementation.BovineLabs.Anchor/App and tests first.Debug.Log*; use BLGlobalLogger outside ECS systems or the project logging policy inside systems.