Skip to content

#1322 W5a: macOS Unity player build (batch build script + guards + config env vars)#1432

Merged
100yenadmin merged 1 commit into
mainfrom
feat/w5a-player-build
Jul 8, 2026
Merged

#1322 W5a: macOS Unity player build (batch build script + guards + config env vars)#1432
100yenadmin merged 1 commit into
mainfrom
feat/w5a-player-build

Conversation

@100yenadmin

Copy link
Copy Markdown
Member

Summary

  • Adds BuildMacOSPlayer.cs (Tools/WorldOS/Build/macOS Player (Universal) MenuItem) — batch-builds a Universal (x64+AppleSilicon) macOS standalone player from the current-best combat scene (M1CombatV1_canonical.unity), sets company/product/bundle id to worldos/WorldOSPlayer/com.worldos.WorldOSPlayer, and registers the scene in EditorBuildSettings (was empty — a build would have shipped scene-less).
  • Guards 4 legacy editor-only scripts (AnimFrameCapture, IntegrationBuilder, TavernTier1Builder, SetupPainterlyScene) with #if UNITY_EDITOR/#endif — they referenced UnityEditor/[MenuItem] while sitting outside Assets/Editor/, which breaks player compilation. Additive/no editor behavior change.
  • CombatSurfaceClient.cs now resolves WORLDOS_ENGINE_BASE_URL / WORLDOS_CAMPAIGN_ID from the process environment before falling back to today's hardcoded defaults (byte-identical when absent) — per the app-host launch contract landed in feat(macos): W5 player-build launch handoff (#1322) #1430 (NSWorkspace configuration.environment).
  • Build evidence (report, bundle listing incl. file confirming the universal Mach-O binary, log tail, and a structural-findings note) in qa/evidence/1322-build/.

Structural finding, reported not hacked (see qa/evidence/1322-build/NOTES.md): CombatSurfaceClient (the sole runtime /combat-surface consumer) isn't attached to any GameObject in any scene yet, and its actor lookups (GameObject.Find("HeroFighter"/"MonsterGoblin")) predate the current asset-registry actor naming (Actor_char_<hash>). Wiring live polling + input is W5c scope per the issue's design packet; this build ships the composed scene as a static frame.

Built + verified on the GEX44 box (Unity 6000.5.1f1, headed editor, execute_menu_item — not -batchmode, which kills the box's live MCP server per BOX.md #1196). Result: Succeeded, 0 errors, 56 pre-existing warnings, 158,429,215 bytes, 1m9s build time. .app delivered to the Mac out of band (~/worldos-session-notes/w5a-build/WorldOSPlayer.app.zip, not committed — binary).

Closes the W5a slice of #1322 (packaging only — W5b/c/d follow per the issue's design packet).

Test plan

  • Player build compiles with 0 errors (verified via read_console + Logs/Editor.log)
  • .app bundle structure sane (Contents/MacOS/WorldOSPlayer, Frameworks/UnityPlayer.dylib, Resources/Data/*)
  • Executable confirmed Universal via file (Mach-O universal binary: x86_64 + arm64)
  • Zip integrity verified on the Mac side (unzip -t)
  • GUI smoke-launch on a real Mac (not exercised in this sandboxed session — box-side build verification only, per task scope)

…guards, config env vars)

Adds BuildMacOSPlayer.cs (Tools/WorldOS/Build/macOS Player (Universal) MenuItem) that builds a
Universal (x64+AppleSilicon) macOS standalone player from the current-best combat scene
(M1CombatV1_canonical.unity), sets company/product/bundle id to worldos/WorldOSPlayer, and
registers the scene in EditorBuildSettings (was empty).

Guards 4 legacy editor-only scripts (AnimFrameCapture, IntegrationBuilder, TavernTier1Builder,
SetupPainterlyScene) that referenced UnityEditor/[MenuItem] outside Assets/Editor/ with
#if UNITY_EDITOR, so the player build compiles clean (0 errors).

CombatSurfaceClient now resolves WORLDOS_ENGINE_BASE_URL / WORLDOS_CAMPAIGN_ID from the process
environment before falling back to today's hardcoded defaults (byte-identical when absent), per
the app-host launch contract (NSWorkspace configuration.environment, PR #1430).

Build evidence (report, bundle listing, log tail, structural findings) in
qa/evidence/1322-build/. Built + verified on the GEX44 box; .app delivered to the Mac out of
band (not committed, binary).
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 11 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 45f599a1-f113-42dc-8041-0484880cf796

📥 Commits

Reviewing files that changed from the base of the PR and between a13aae4 and 48332c0.

📒 Files selected for processing (10)
  • extensions/renderers/unity/scripts/AnimFrameCapture.cs
  • extensions/renderers/unity/scripts/BuildMacOSPlayer.cs
  • extensions/renderers/unity/scripts/CombatSurfaceClient.cs
  • extensions/renderers/unity/scripts/IntegrationBuilder.cs
  • extensions/renderers/unity/scripts/SetupPainterlyScene.cs
  • extensions/renderers/unity/scripts/TavernTier1Builder.cs
  • qa/evidence/1322-build/NOTES.md
  • qa/evidence/1322-build/build-log-tail.txt
  • qa/evidence/1322-build/build-report.txt
  • qa/evidence/1322-build/bundle-listing.txt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/w5a-player-build

Comment @coderabbitai help to get the list of available commands.

EditorBuildSettings.scenes = scenes;

string projectRoot = Directory.GetParent(Application.dataPath).FullName;
string outDir = Path.Combine(projectRoot, OutputDir);
string projectRoot = Directory.GetParent(Application.dataPath).FullName;
string outDir = Path.Combine(projectRoot, OutputDir);
Directory.CreateDirectory(outDir);
string appPath = Path.Combine(outDir, AppName);
BuildReport report = BuildPipeline.BuildPlayer(options);
var s = report.summary;

string reportPath = Path.Combine(outDir, "build-report.txt");
Comment on lines +43 to +49
catch (Exception e)
{
Debug.LogWarning("[BuildMacOSPlayer] Universal architecture unavailable (" + e.Message + "); falling back to x64.");
try { UnityEditor.OSXStandalone.UserBuildSettings.architecture = UnityEditor.Build.OSArchitecture.x64; }
catch { /* leave editor default */ }
archResult = "x64 (fallback)";
}
{
Debug.LogWarning("[BuildMacOSPlayer] Universal architecture unavailable (" + e.Message + "); falling back to x64.");
try { UnityEditor.OSXStandalone.UserBuildSettings.architecture = UnityEditor.Build.OSArchitecture.x64; }
catch { /* leave editor default */ }
@evaos-code-review-bot

evaos-code-review-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

evaOS review status: closed or merged before review

PR: #1432 - #1322 W5a: macOS Unity player build (batch build script + guards + config env vars)
Head: 48332c0f6e568077f2a480a9304d9d9855bbc632
Updated: 2026-07-08T16:44:41.505Z

evaOS review stopped because the PR closed or merged before this queued head could be reviewed.

Automation note: agents should wait for this comment to reach completed, stale_head, closed_or_merged_before_review, skipped, or failed before treating evaOS review as settled for this head. provider_deferred means evaOS still intends to retry.

PR URL: #1432

Details: state=closed

@100yenadmin 100yenadmin merged commit 8475c59 into main Jul 8, 2026
28 of 32 checks passed
@100yenadmin 100yenadmin deleted the feat/w5a-player-build branch July 8, 2026 16:45
100yenadmin added a commit that referenced this pull request Jul 8, 2026
…urfaceClient live (#1435)

- Commit WorldOS/OccluderDepth as a build-included .shader asset (was runtime ShaderUtil
  CreateShaderAsset -> stripped from the player build -> magenta occluder cubes). paint_combat_v1
  prefers the committed shader (runtime fallback keeps the editor capture flow byte-identical).
- CombatSurfaceClient: resolve actors by Actor_<token.id> registry naming (was stale HeroFighter/
  MonsterGoblin lookups); cell<->world mirrors paint_combat_v1 (grid from surface, cell 2.0, row-flip);
  click -> POST /move with the existing kinds only (move_to_cell / on-turn attack), payloads byte-exact
  to qa/drive_gfx_combat.py. Attached to M1CombatV1_canonical via the W5bWireScene migration MenuItem.
- Evidence in qa/evidence/1433/ (build report + shader-inclusion log + before-magenta smoke frame).

Refs #1322, PR #1430, PR #1432.

Co-authored-by: Eva <arncalso@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant