Skip to content

Layout Nodes

Cave

Generates an organic cave via cellular automata as tagged spawn points. prefabHandle: 0=floor, 1=wall.

Inputs

  • Seed (Float)
  • Width (Int)
  • Height (Int)
  • Cell Size (Float)
  • Fill Prob (Float)
  • Smooth Passes (Int)

Outputs

  • Spawns (Scatter)

Fit Along Span

Solves span-fitting layout: how many items fit and where does item i go.

Inputs

  • Span (Float)
  • Item Size (Float)
  • Index (Float)

Outputs

  • Count (Float)
  • Step (Float)
  • Spacing (Float)
  • Offset (Float)

Options

  • fitMode: Layout strategy. Fill: adjusts the per-item pitch so that exactly Count items fill Span (Count = round(Span / Item Size)). Trim: floor(Span / Item Size) items packed flush from the origin; Item Size is used as-is. Center: same count as Trim, shifted so equal margins appear at both ends.

Tips

  • Wire the loop iterator to Index to place items in a ForEach loop.
  • Fill scales item pitch to fill Span exactly. Trim and Center use Item Size as-is.
  • Spacing = Step minus Item Size. In Trim and Center modes Spacing is always 0.
  • Center adds an equal margin at each end: Offset(0) = margin, not 0.

Grid Dungeon

Generates a BSP-partitioned dungeon grid as tagged spawn points using MST corridor routing. Cell handles: 0=floor, 1=wall, 2=door. Room marker handles: 3=room, 4=start, 5=exit. Scale on room markers = max room dimension in world units.

Inputs

  • Seed (Float)
  • Width (Int)
  • Height (Int)
  • Cell Size (Float)
  • Min Room (Int)
  • Max Room (Int)
  • Loop Edges (Int)

Outputs

  • Spawns (Scatter)

Tips

  • Use FilterByCategory ‘Floor’ + ‘Door’ to stamp walkable tiles. Use ‘Wall’ for blockers.
  • Use FilterByCategory ‘Start’ / ‘Exit’ to place spawn portal and boss-exit prefabs.
  • Use ForEachSpawnNode on handle 3/4/5 to run a sub-graph per room (loot spawner, lighting, etc.).
  • Loop Edges adds non-MST shortcuts for more organic layouts: 1-2 is usually enough.