#1322 W5a: macOS Unity player build (batch build script + guards + config env vars)#1432
Conversation
…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).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 11 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| 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"); |
| 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 review status: closed or merged before reviewPR: #1432 - #1322 W5a: macOS Unity player build (batch build script + guards + config env vars) 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 PR URL: #1432 Details: state=closed |
…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>
Summary
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 toworldos/WorldOSPlayer/com.worldos.WorldOSPlayer, and registers the scene inEditorBuildSettings(was empty — a build would have shipped scene-less).AnimFrameCapture,IntegrationBuilder,TavernTier1Builder,SetupPainterlyScene) with#if UNITY_EDITOR/#endif— they referencedUnityEditor/[MenuItem]while sitting outsideAssets/Editor/, which breaks player compilation. Additive/no editor behavior change.CombatSurfaceClient.csnow resolvesWORLDOS_ENGINE_BASE_URL/WORLDOS_CAMPAIGN_IDfrom 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 (NSWorkspaceconfiguration.environment).fileconfirming the universal Mach-O binary, log tail, and a structural-findings note) inqa/evidence/1322-build/.Structural finding, reported not hacked (see
qa/evidence/1322-build/NOTES.md):CombatSurfaceClient(the sole runtime/combat-surfaceconsumer) 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..appdelivered 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
read_console+Logs/Editor.log).appbundle structure sane (Contents/MacOS/WorldOSPlayer,Frameworks/UnityPlayer.dylib,Resources/Data/*)file(Mach-O universal binary: x86_64 + arm64)unzip -t)