RuntimeCSG

RuntimeCSG

Non-destructive CSG brush modeling for Unity. Build geometry with boolean operations in real-time.

RuntimeCSG editor demo - real-time face hover and selection

Real-time face hover, operation-colored wireframes, and click-to-select in the Unity editor.

3Boolean Ops
5Primitives
185Unit Tests
3Unity Versions

Runtime Ready

Not just an editor tool. RuntimeCSG works at runtime for procedural levels, destructible environments, and player-built worlds. Tested across Unity 2022.3, 6000.1, and 6000.3 with 185 passing tests (143 editor + 42 runtime).

Three Operations, Infinite Shapes

Combine simple brushes into complex geometry with real-time boolean operations.

Union

A + B

Merge brushes together. Add geometry to build up your scene.

Subtract

A − B

Carve and cut. Remove geometry to create holes, doorways, windows.

Intersect

A ∩ B

Keep only the overlap. Create complex shapes from simple primitives.

Built for the Unity Editor

Scene overlay toolbar, keyboard shortcuts, and visual feedback so you never leave the viewport.

  • Mode toggle between Add and Subtract
  • One-key brush creation (Shift+B/W/C/S)
  • Per-brush wireframe overlays with operation coloring
  • Face drag handles for direct manipulation
  • Inspector buttons for shape and operation changes
RuntimeCSG editor with wireframe overlays and toolbar

Features

Per-Brush CSG Engine

Chisel-style algorithm processes each brush independently. Fragments are split and evaluated against the full boolean chain.

Chunk System

World-space grid chunking with dirty tracking. Only affected chunks rebuild. Time-sliced across frames for smooth performance.

Runtime API

Full runtime API for procedural generation. Create, modify, and rebuild CSG geometry from code with 42 dedicated runtime tests.

Double Precision Math

Plane math uses doubles internally. No precision collapse at world-scale distances. Float only at mesh output.

Coplanar Handling

Later-brush-wins tiebreaker prevents z-fighting. No duplicate surfaces or flickering between overlapping faces.

Auto Colliders

Each chunk generates a MeshCollider automatically. Physics-ready geometry with zero extra setup.

Undo Support

Full Unity Undo integration. Every brush add, shape change, and face drag is undoable.

Multi-Version Tested

185 tests passing across Unity 2022.3, 6000.1, and 6000.3. Editor and runtime coverage with CI validation.

UPM Package

Clean runtime/editor assembly split. No dependencies. Drop-in integration for any Unity project.

Brush Primitives

Start with built-in shapes. Combine them to build anything.

Box Wedge Cylinder Arch Sphere

How It Works

Chisel-style per-brush CSG in four steps.

Split

Each brush's polygons are split against planes of all overlapping brushes, creating convex fragments.

Categorize

Each fragment is classified as inside, outside, or coplanar relative to every other brush.

Evaluate

The boolean chain is evaluated for both sides of each fragment to determine visibility.

Build Mesh

Visible fragments are clipped to chunk bounds and built into Unity meshes with colliders.

Quick Start

CSG at runtime in a few lines.

// Create a model, add brushes, rebuild var model = new GameObject("Level").AddComponent<CSGModel>(); var floor = CreateBrush(model, BrushFactory.Box(new Vector3(10, 0.1f, 10))); var wall = CreateBrush(model, BrushFactory.Box(new Vector3(0.1f, 3, 10))); var door = CreateBrush(model, BrushFactory.Box(new Vector3(0.5f, 2, 1))); door.Operation = CSGOperation.Subtractive; model.RebuildAll();

Editor Shortcuts

TabToggle Add / Subtract mode
Shift+BAdd box brush
Shift+WAdd wedge brush
Shift+CAdd cylinder brush
Shift+SAdd sphere brush

Screenshots

RuntimeCSG in action across different scenes and workflows.

RuntimeCSG hero banner showing CSG workflow

Real-time CSG brush modeling workflow

Install

Unity Asset Store

Coming Soon

RuntimeCSG will be available on the Unity Asset Store. Stay tuned for the release.

Early Access

Request Access

Interested in trying RuntimeCSG now? Reach out on Discord for early access.