scenario-unity-world-building
Unity world building (level and environment artist)
Expert world building is structure first, then generated content that can be regenerated, then proof: the character fits every space, the camera fits every doorway, the player can reach every space and walk back, the edge of the world holds content, and the worst viewpoint holds the frame budget in a Player. An agent without a mouse does all of it through TerrainData, the ProBuilder API, PrefabUtility and scene APIs, then checks with raycasts, NavMesh paths, captures, a profiling tour and a Player probe. Target: Unity 6000.3.21f1, URP 17.3, ProBuilder 6.1.2, Splines 2.9.0, AI Navigation 2.0.14. If a sibling skill named here is missing from your available skills, ask the user to install it (npx skills add scenario-labs/skills --skill <name>); unattended, proceed from tool schemas and flag the gap.
REQUIRED BACKGROUND: scenario-unity-expert (channels, review loop, 6.3 traps). Import its toolkit; this skill adds scripts/ut_world.py, C# jobs in scripts/AgentKit/World/ and a runtime assembly in scripts/Runtime/World/.
Status (2026-09-24, after the blind-grade refactor): every procedure ran in Unity 6000.3.21f1 on this Mac except the plans marked [not run] in references/procedures.md: tests/code/unity-world-building/test_live_world.py (13 live tests), test_live_world_v2.py (12 live tests) and test_offline.py (7).
Stance (the expert delta)
- Lock the structure before content. Terrain size and every texture resolution before sculpting (later changes rescale or resample, 6.3 Terrain manual); metrics from the character AND its camera before blockout, proven in a gym rebuilt whenever the controller changes (level design e-book, gym/zoo); the kit grid before placement (Christina Creates Games, 0o-QnNs-stc [00:07:35]). In code, persist the
TerrainDataasset before writing splat or the alphamaps are lost (observed). - Author non-destructively, regenerate deterministically. Alba renders movable features, levelers and roads to the heightmap and regenerates the world in ordered, skippable steps before play and in CI; the generated scene is checked in with
git update-index --skip-worktree(Manesh Mistry, YOtDVv5-0A4 [00:06:10], [00:09:52], [00:10:05]). A PolyShape rebuilt from its footprint drops every later edit (ProBuilder manual; observed 12 faces back to 7): keep the recipe, not the edited mesh. - Raw procedural output needs a second layer. Noise needs erosion (Lague, eaXk97ujbPQ); WFC needs authored tiles (DV Gen, 20KHNA9jTsE [00:04:22]); roads need routing: a slope-aware A* route cut 2.6 m where straight knots cut a 9.1 m canyon (Alba [00:07:45]; observed).
- Block out with one generic piece, then bulk replace; prefab every piece and every compound. One wall everywhere, then doors and windows by replacement (Christina [00:15:14]); a metric fix is one prefab edit (YsBniZ5ya7k [00:06:25]). In a script, record the instance override before replacing:
ReplacePrefabAssetOfPrefabInstancekept 0 of 30 placements withoutRecordPrefabInstancePropertyModifications, 30 of 30 with it (observed; the grid audit stayed clean, a slot and perimeter audit caught it). - The graybox exit gate is mechanical. Doors from agent radius and camera boom, NavMesh over every whole floor with door leaves modified out of the bake and clutter that never splits a room, roofs marked Not Walkable, upper floors linked, one NavMesh Surface per area (Christina [00:17:12], [00:19:27]; YsBniZ5ya7k [00:15:24]); a quick bake for dark zones; landmarks and paths first, signs last (Adam Robinson-Yu, ZW8gWgpptI8 [00:18:37]).
- Players test the edge first; guide with a ladder. On an island they swim out and around: put content and a way back on every stretch of coast, not walls ([00:16:54], [00:17:58]). Landmarks, breadcrumbs, paths that lead back, inclines toward the goal, signs last; false peaks need a reason. Here 32 of 36 coast bearings had nothing within 150 m (observed).
- Stream only what does not fit, around a persistent core, and judge it in a Player. Alba kept its island resident with LOD and relevance systems ([00:12:43]). The core owns RenderSettings, lightmaps and fog; load by path; never hold
allowSceneActivation = falsein play (it froze a queued unload for a second, observed); sweep assets after unloads; show a merged proxy while a visible chunk is out.backgroundLoadingPriorityand the Integrate marker only mean something in a built Player (6.3 Scripting API; Editor counters read 0 here). - Profile the worst viewpoint, compare statistics, fix on the device's terms. Teleport to anchors, turn 360 degrees, keep the worst heading (Alba [00:29:46]); compare about 200 frames per side (Profile Analyzer, [00:17:00]). On tile-based mobile GPUs opaque LOD foliage beats alpha-tested impostors (7.12 of 32.5 ms, [00:20:14]); Firewatch's distance alpha cutoff is a PC and console choice (Jane Ng, ZYnS3kKTcGg [00:20:29]). LOD Group trees ignore
Terrain.treeDistance(60 m and 700 m gave identical frames, observed): the LOD Group is the lever.