Hyper Light Studios
v1.0.1Unity 2021.3+Last updated: Feb 2026

Tips & FAQ

25. Tips & Best Practices

Generator Actions

The Actions card at the top of the Pile Generator inspector provides:

ButtonDescription
GeneratePlace all pieces fresh using the current seed
SettleRun physics simulation from current positions
⚙ CollidersRebuild all colliders from current shape settings
ClearRemove all generated pieces
Generate & SettleOne-click workflow for physics piles
RandomizeRoll a random seed and generate
Auto Generate / SettleWhen enabled, any setting change automatically triggers Generate + Settle

Warning: Auto Generate / Settle is convenient but can cause editor lag on complex piles with many pieces. Disable it during bulk profile editing.

Count & Scale Overrides

The Generator supports global multipliers applied on top of the profile's settings:

FieldDescription
Count OverrideOverride total piece count (0 = use profile default)
Count MultiplierScale piece count by a factor (0.1–10×)
Scale MultiplierScale all piece sizes by a factor (0.1–5×)
Scale Count With RadiusReduce count proportionally when radius is reduced (preserves density)

These are useful for adapting a single profile to different scene scales without creating new profiles.

Performance

  • Combine meshes before shipping — reduces draw calls from N to 1
  • Texture bake for mobile/VR — URP/Lit is cheaper than the procedural shader
  • Use LODs for distant piles
  • Mark static for static batching
  • Vertex shape modifiers at 0 have zero GPU cost

Visual Quality

  • Use 2–3 layers for natural-looking piles (base + mid + top)
  • Set Color Variation to 0.05–0.15 for subtle per-piece tint
  • Use Pattern Library overlays to add detail without textures
  • Combine Smooth shading with procedural normals for high-quality surfaces
  • Use Vertex Noise (0.02–0.05) for subtle organic variation on rocks

Workflow

  • Use Live Preview during iteration (but disable for complex profiles)
  • Use Seed History to compare different arrangements
  • Generate & Settle is the fastest workflow for physics-based piles
  • Create Shape Presets for shapes you reuse across profiles
  • Use per-shape materials when a pile has mixed material types
  • Use Quick Preset for rapid single-shape prototyping

Common Setups

Rock Pile:

  • Icosahedron primitive, vertex noise 0.3, chip amount 0.2
  • Rock material type, LowPoly shading
  • 3 layers: large base (5 pcs), medium mid (10 pcs), small top (15 pcs)

Book Stack:

  • Cube primitive, flat bias enabled
  • Book material type, Smooth shading
  • 1 layer, 8–12 books, low rotation variance

Bottle Collection:

  • Lathe primitive with various bottle profiles
  • Glass material type, Smooth shading, double-sided enabled
  • 2 layers: standing bottles (base), fallen bottles (top)

26. Troubleshooting

Pieces don't appear

  • Ensure the Generator has a Profile or Quick Preset assigned
  • Check that the profile has at least one Shape Rule and one Layer
  • Verify the Radius is large enough

Pieces float in the air

  • Ensure there's a collider below the generator (ground plane)
  • Check that the ground is on the Surface Mask layer
  • Try increasing Raycast Height

Pieces clip through the ground

  • Enable Prevent Ground Penetration in Placement Rules
  • Increase Sink Depth slightly
  • Enable Precise Ground Check

Too many rejected pieces

  • Increase Radius or Overlap Tolerance
  • Reduce piece Count in layers
  • Disable Use OBB Collision for looser packing

Settle doesn't work

  • Ensure there's a ground collider in the scene, or enable Use Ground Plane
  • Increase Physics Steps for tall piles
  • Check that pieces aren't already intersecting the ground

Selecting the object lags the editor

  • Disable Auto Generate / Settle — it triggers a full regeneration whenever any serialized property changes
  • Use Live Preview instead for lighter auto-refresh

Shader looks pink

  • Ensure you're using Universal Render Pipeline (URP)
  • The PileGen/Triplanar shader is URP-only

Baked texture looks wrong

  • Ensure the source material uses PileGen/Triplanar shader
  • Try increasing Texture Resolution
  • Increase UV Padding if you see color bleeding between pieces

Colors flicker or shift when moving objects

  • The instance seed is pre-baked into vertex color alpha at mesh generation time and is fully stable
  • If flickering persists, regenerate the pile to ensure meshes have the baked seed applied

Icons don't appear

  • Run PileGen > Generate Editor Icons from the menu bar

27. FAQ

Q: Does PileGen work with HDRP or Built-in RP? A: The procedural shader requires URP. Use Texture Baking to convert piles to standard URP/Lit materials, then manually swap to HDRP/Lit or Standard shader.

Q: Can I use my own meshes? A: Yes — set the primitive type to Prefab and assign any GameObject. PileGen handles placement, rotation, scaling, and physics for your custom meshes.

Q: Is there a runtime API? A: Yes. PileGenGenerator has public methods: Generate(), Clear(), Settle(), Bake(), RandomizeSeed().

Q: Can I edit the pile after generating? A: Yes. Individual pieces are separate GameObjects until baked. You can manually move, delete, or modify any piece. Settling will re-simulate from current positions.

Q: How many objects can I have per pile? A: The placement system handles hundreds efficiently. For very large piles (500+), increase Overlap Tolerance and consider splitting into multiple generators.

Q: Does it work with Unity 6? A: Yes. PileGen uses version-safe code paths for physics API changes across Unity 2022.3.62f3 and Unity 6.

Q: What's the difference between Count Override and Count Multiplier? A: Count Override replaces the total piece count absolutely (set to 0 to use the profile default). Count Multiplier scales the profile's count by a factor — useful for making a single profile produce both sparse and dense variants.