Skip to content

v0.3.69 — Project actions refuse stale Unity state

Choose a tag to compare

@FoxsterDev FoxsterDev released this 04 Sep 01:35
· 9 commits to master since this release

v0.3.69 — Project actions refuse stale Unity state

Why this matters

A green player-script compile did not prove that Unity had reloaded the editor assembly used by a project action. Asset-reading actions could also run before Unity imported files changed outside the Editor. Both cases could return a confident result from stale state.

This release adds one shared, fail-closed currency preflight for project actions and enables runtime background execution without stealing operating-system focus.

What changed

  • Every catalog-backed project_action runs project_action_currency before its project hook. It compares the loaded editor-domain timestamp with the newest .cs, .asmdef, .asmref, or .rsp input under Assets and blocks stale or unknown state.
  • Catalog entries may declare requiresFreshAssets: true. Invocation then performs and settles a forced AssetDatabase refresh before rechecking editor-domain currency and calling the hook.
  • unity_project_action_currency, unity_project_action_invoke, and unity_status_summary expose the same currency evidence and recovery action.
  • While the bridge is active, it keeps runtime Application.runInBackground=true. It does not change PlayerSettings, does not focus the Unity process, reports native_autofocus_enabled=false, and keeps measured player-loop liveness authoritative.

What this gives developers

  • Project actions no longer silently use editor code or asset state older than the files on disk.
  • Asset-reading hooks declare freshness once in project_actions.yaml; callers do not need to remember a manual refresh.
  • Unfocused Unity automation can continue when Unity supports background execution, without stealing the developer's active window.

Validation

  • Full host discovery: 1009 passed, 14 expected platform skips, including live localhost TCP framing coverage.
  • Clean current-source package compilation and probe v4 passed on Unity 2022.3.62f3, 2022.3.67f2, 6000.0.58f2, 6000.1.13f1, 6000.2.14f1, 6000.3.23f1, 6000.4.4f1, 6000.5.10f1, and 6000.6.0b3. Every probe reported game_view_reflection_v1, both Game View operations, and unity.project_action.currency as supported.
  • Package EditMode tests: 102/102 passed with post-settle compilation green on Unity 2022.3.67f2 and 6000.6.0b3.
  • An unfocused Unity 6000.6.0b3 editor completed the full enter-Play-Mode/exit-Play-Mode interactive scenario with application_run_in_background=true and native_autofocus_enabled=false.
  • Public site UI and accessibility checks: 42/42 passed across desktop, mobile, and narrow Chromium viewports.

Known limitations

  • A first cold-project interactive run on Unity 6000.3, 6000.5, or 6000.6 can still encounter the existing transient Import Worker ownership guard during refresh. The warmed Unity 6000.6 rerun and its package tests passed; the guard fails closed and does not indicate a C# or Game View API incompatibility.
  • Application.runInBackground is an execution preference, not proof that the player loop advanced. Callers must continue to use the reported liveness fields for Play Mode conclusions.
  • Live Unity validation was performed on macOS. Native Windows and Linux host sessions were not rerun for this release.
  • The hosted Unity Package CI workflow remains explicitly waived because its runners do not have Unity license credentials. Local clean-project Unity validation is the package evidence for this release.

Git UPM:

https://github.com/FoxsterDev/xuunity-mcp.git?path=/packages/com.xuunity.light-mcp#v0.3.69