How wysl-2/worldmeshes works
WorldMeshes is a Unity terrain-authoring editor with runtime terrain generation and clipmap presentation. The main workflow is to edit terrain modifiers, inspect staged previews and analysis visualizations, then run a runtime bake that plans and generates terrain outputs, packages Addressables, and synchronizes the scene. Stamps and regional elevation are distinct authoring capabilities. The sampled excerpts support preview residency/composition and bake orchestration; some feature wiring is inferred only at subsystem level from the tree, so uncertain calls are omitted.
Main entry points: TerrainRuntimeBakePipeline.cs Bake Pipeline · WorldMeshesEditorWindow.cs WorldMeshes Window · TerrainAuthoringSceneViewController.cs Scene Preview Control · TerrainAuthoringPreviewService.cs Preview Service
Components 19
Terrain Authoring
- Modifier Editing
Editor/Authoring/Modifiers/TerrainAuthoringModifierService.cs - Stamp Library
Editor/Authoring/Stamps/TerrainHeightStampLibraryUtility.cs - Regional Elevation
Editor/Authoring/RegionalElevation/TerrainRegionalElevationService.cs
Preview And Analysis
- Scene Preview Control
Editor/Preview/Scene/TerrainAuthoringSceneViewController.cs - Preview Service
Editor/Preview/Core/TerrainAuthoringPreviewService.cs - Preview Cache
Editor/Preview/Core/TerrainAuthoringPreviewCache.cs - Height Compositor
Editor/Preview/Composition/TerrainHeightCompositor.cs - Terrain Analysis Views
Editor/Visualization/TerrainAuthoringVisualizationController.cs
Runtime Bake
- Bake Planner
Editor/RuntimeBake/Planning/TerrainRuntimeBakePlanner.cs - Bake Pipeline
Editor/RuntimeBake/Pipeline/TerrainRuntimeBakePipeline.cs - Height Generation
Editor/Generation/Height/TerrainRuntimeHeightCompiler.cs - Height Streaming
Editor/Generation/Height/TerrainRuntimeHeightStreamingCompiler.cs - Surface Masks
Editor/Generation/Surface/TerrainSurfaceMaskCompiler.cs - Collision Meshes
Editor/Generation/Collision/TerrainCollisionMeshGenerator.cs - Addressables Packaging
Editor/RuntimeBake/Addressables/TerrainRuntimeAddressablesUtility.cs - Scene Synchronization
Editor/RuntimeBake/Scene/TerrainRuntimeSceneSynchronizer.cs
Runtime Terrain
- Clipmap Controller
Runtime/Clipmap/TerrainClipmapController.cs
Editor Interface
- WorldMeshes Window
Editor/Window/Core/WorldMeshesEditorWindow.cs
Other components
- Terrain Artist
Connections 18
- Terrain Artist → WorldMeshes Window: authors in
- WorldMeshes Window → Modifier Editing: edits modifiers
- WorldMeshes Window → Stamp Library: manages stamps
- WorldMeshes Window → Regional Elevation: edits elevations
- WorldMeshes Window → Scene Preview Control: views terrain
- Scene Preview Control → Preview Service: requests residency
- Preview Service → Preview Cache: stages cache
- Preview Service → Height Compositor: composes tiles
- Scene Preview Control → Terrain Analysis Views: selects display
- WorldMeshes Window → Bake Pipeline: starts bake
- Bake Pipeline → Bake Planner: plans stages
- Bake Pipeline → Height Generation: compiles height
- Bake Pipeline → Height Streaming: compiles streaming
- Bake Pipeline → Surface Masks: generates masks
- Bake Pipeline → Collision Meshes: generates collision
- Bake Pipeline → Addressables Packaging: packages assets
- Bake Pipeline → Scene Synchronization: synchronizes scene
- Scene Synchronization → Clipmap Controller: configures scene