# 6. ProBuilder Pitfalls
Part of [[ProBuilder Gray-Boxing and Landmarks]]. Prev: [[5. Worked Example Landmark Blockout]].
## Editing `MeshFilter.sharedMesh`
The official API docs are explicit: do not. ProBuilder will overwrite the Unity mesh on the next `ToMesh()`. All edits go through `ProBuilderMesh`, then `ToMesh()` + `Refresh()`, then `EditorMeshUtility.Optimize` in the Editor.
## Forgot the URP / HDRP samples
Vertex colors and some textures will not shade correctly. Import the Samples entry that matches your pipeline (6.1 install manual). Pink or unlit gray-boxes are usually this, not a broken generator.
## Scale versus size
`GenerateCube(pivot, size)` sets a bounding box. If you then scale the transform to "make it bigger," your metrics (door height, jump gaps) are now lies, and child colliders get confusing. Leave scale at 1 and change the mesh.
## Colors that do not show
`colors` and `vertexCount` are real 6.1.4 APIs. If tints do not appear in Game view, you probably skipped the URP vertex-color sample shaders, or you forgot `ToMesh()` / `Refresh()` after assigning `colors`. Paint with the Vertex Color tool only as a manual override, not as a workaround for a "missing" API.
## Colliders after Refresh
Confirm a collider exists after `Refresh()`. If play mode lets you walk through a wall, you shipped a visual. Add a `MeshCollider` (non-convex for rooms; convex only for simple props - a room mesh will fail convex).
## Baking lights too early
Wayfinding lights in the blockout are a design prototype. Baking them before the layout is stable wastes a lightmap and makes people afraid to move walls. Keep lights realtime until the path is fun, then follow [[Lighting and Baking]].
## Weenie you cannot see, or cannot reach
If the sightline from the entrance is blocked, it is not a weenie. If the silhouette says "climb me" and you cannot, you have broken "if it looks like the player can go there, then they should be able to." Change the mesh or add the route.
## Long walks
If Gate Road bores you in Play Mode, it bores the player. Shorten it or put a reward mid-span. Do not fix it with a loading tip.
## Re-running the builder
The menu destroys `BeatChart_Blockout` by name. If you renamed the root, you will stack a second copy. If you dressed the blockout and then rebuild, you lose the dressing unless it lives *outside* the root. Dressing belongs in a sibling `BeatChart_Dressing` object, or you accept the rebuild as disposable.
## Runtime generation cost
The API is legal at runtime. Spawning a whole level from `ShapeGenerator` on a Quest at start is still a hitch waiting to happen. For class work, build in the Editor and ship the meshes.
## Export and replace
When art arrives, do not sculpt the unique hero mesh in ProBuilder for a week. Export (ProBuilder's model export is a documented feature of the package) or rebuild in a DCC, and keep the *volumes*. The gray-box was the design, not the final material.
## Sources
- API overview (6.1.4): https://docs.unity3d.com/Packages/
[email protected]/manual/api.html
- Installing / Samples (6.1): https://docs.unity3d.com/Packages/
[email protected]/manual/installing.html