Skip to content

v0.3.61 — Launch Unity with the arguments its host requires

Choose a tag to compare

@FoxsterDev FoxsterDev released this 27 Aug 15:39
· 27 commits to master since this release

v0.3.61 — Launch Unity with the arguments its host requires

Why this matters

A Unity Editor could be running but blocked on licensing or another startup dialog before the Model Context Protocol (MCP) bridge attached. XUUnity then looked like a long, silent timeout even when the project Editor.log already contained the reason, and developers could not pass the startup argument needed to recover.

Scenario authors also had to diagnose several avoidable failures by hand: missing hooks hidden by build-profile defines, profile changes followed by the wrong settle step, and poll-until steps that stopped after one unmatched result.

What changed

  • open-editor and ensure-ready --open-editor now accept ordered, repeatable --unity-arg values. The launch result records the effective arguments, and an existing editor is reused only when its process command proves that the requested arguments are already present.
  • ensure-ready now distinguishes a live editor whose bridge never attached. It reports the editor process identifier, project Editor.log path, log idle time, and the last unresolved licensing or startup-dialog line. Fresh licensing errors receive five seconds to recover because Unity 2022 can briefly report a missing channel while starting its local licensing client; stale invalid-license evidence still fails immediately.
  • scenario_invalid now includes the first validation cause. When a missing hook has a source candidate in an assembly definition with define constraints, the diagnostic includes those constraints and the active player defines.
  • Profile actions can declare mutationSettlePolicy: apply_then_gate. Scenario validation then requires wait, status, and compile_player_scripts after the apply step and rejects an immediate project_refresh.
  • project_defined_hook_poll_until now continues unmatched successful payloads until timeout when continueWhen is omitted.
  • Project-action catalogs can mark hooks as host-scoped and require payload fields, every host command accepts --json-only, GUI evidence guidance pins the Game View before Play Mode, and request-editor-quit --force-after-ms can terminate one identity-verified same-project editor after a quit timeout.

What this gives developers

  • Host-specific licensing and cache arguments can stay inside XUUnity's guarded editor-launch workflow.
  • A blocked launch returns a concrete cause and next action in seconds instead of ending as an unexplained readiness timeout.
  • Scenario validation points to the disabled hook assembly or invalid settle sequence before a long GUI lane starts.
  • Scripted callers can keep standard output to one final JSON result, and a stuck editor quit has an explicit process-identity safety gate.

Validation

  • Host suite: 966/966 passed with 14 expected platform skips.
  • Public documentation UI suite: 42/42 browser checks passed.
  • Clean Unity 2022.3.67f2 and 6000.0.58f2 projects: package EditMode 91/91 and PlayMode 5/5 passed on both versions.
  • Unity 2022.3.62f3 consumer: package EditMode 91/91; broader PlayMode environment 18 passed with one expected environment skip.
  • Unity 6000.0.58f2 consumer: Android compile passed; profile apply-then-gate 7/7, fixed-Game-View GUI scenario 18/18, and profile restore/compile 8/8 passed.

Known limitations

  • Unity Package CI remains explicitly waived because the hosted runners do not have Unity license credentials. The local Unity runs above validate this release, but the release commit has no CI-recorded EditMode or PlayMode proof.
  • Live editor-launch and forced-quit validation was performed on macOS. Windows and Linux host paths are covered by the host suite, not by a live editor run in this release cycle.