Skip to content

t1k:unity:rendering:probuilder

FieldValue
Modulerendering
Version3.1.7
Effortmedium
Tools

Keywords: 3D modeling, level design, ProBuilder, unity

/t1k:unity:rendering:probuilder

  • ProBuilderMesh — Component storing mesh data (positions, UVs, faces, colors)
  • Face — Defines face geometry with triangle indices, material, smoothing group
  • ShapeGenerator — Creates primitive shapes (cube, cylinder, sphere, etc.)

Reference for Unity ProBuilder 6.x (Unity 6). Covers programmatic mesh creation, shape generation, face/edge/vertex editing, material assignment, UV editing, and exporting to standard Unity meshes. Focused on editor scripting for level geometry and modular tile/obstacle creation.

Package: com.unity.probuilder 6.0.9 (Unity 6 compatible) Related skills: dots-ecs (ECS baking) · dots-graphics (ECS rendering)


  • Creating geometry with ProBuilder (shapes, tiles, obstacles, level pieces)
  • Using ShapeGenerator, ProBuilderMesh.Create(), ProBuilderMesh.CreateShapeFromPreset()
  • Editing faces, edges, vertices programmatically
  • Assigning materials per-face, vertex colors
  • Exporting ProBuilder meshes to standard Unity Mesh assets
  • Building modular level geometry (tiles, walls, floors)
  • Setting up UV editing, auto-UV, manual UV

TaskReference File
Programmatic mesh creation, ShapeGenerator, Face/Vertexmesh-creation-guide.md
Material assignment, vertex colors, UV editingmaterials-uvs-guide.md
Export to standard Mesh, stripping ProBuilderMeshexport-workflow-guide.md

using UnityEngine.ProBuilder; // Runtime: ProBuilderMesh, Face, Vertex, math
using UnityEngine.ProBuilder.MeshOperations; // Runtime: topology, I/O, merge, subdivide
using UnityEditor.ProBuilder; // Editor: menus, windows, toolbar extensions

Core workflow — create or modify:

  1. ProBuilderMesh.Create(positions, faces) or ShapeGenerator.CreateShape(ShapeType.Cube)
  2. Modify vertices, faces, edges via ProBuilderMesh API
  3. Call .ToMesh() to compile to UnityEngine.Mesh
  4. Call .Refresh() to rebuild UVs, tangents, normals
  5. In Editor: UnityEditor.ProBuilder.EditorMeshUtility.Optimize() for final optimization

Critical rules:

  • Modify ProBuilderMesh data, NOT MeshFilter.sharedMesh directly
  • Always call .ToMesh() then .Refresh() after any mesh modification
  • To strip ProBuilder dependency: export mesh via MeshUtility or save MeshFilter.sharedMesh as .asset
  • For flat shading: set smoothing group to 0 per face, or use unshared vertices
  • For level geometry: save as prefab after stripping ProBuilderMesh component

Common gotchas:

IssueFix
Mesh not updating after code changesCall .ToMesh() then .Refresh()
ProBuilder dependency in runtime buildStrip ProBuilderMesh, save Mesh as .asset
Faces sharing smoothing = smooth normalsSet face.smoothingGroup = 0 for flat shading
UV seams visibleUse face.uv auto-UV settings or manual UV unwrap
ShapeGenerator shape wrong sizeSet localScale on transform after creation
  • ProBuilder meshes are NOT static-batchable by default — flag manually or batching skips them.
  • ProBuilderize → Lightmap UVs requires explicit Generate — auto-bake skips ProBuilder geometry without uvs.
  • Boolean operations on complex meshes can produce non-manifold geometry — validate with mesh checker before merging.