Table of Contents

BRG Instance Group


Converts a hierarchy of child GameObjects into a compact baked instance blob and renders it via BRG Instanced Renderer with zero per-instance GameObject overhead. After baking, the child GameObjects are destroyed — only transforms and render signatures remain, stored on the component itself.

This is an alternative to BRG GameObject Group. Use it when you don't need per-instance runtime transform tracking, scripting access, or scene-level edits on individual instances.

BRG GameObject Group BRG Instance Group
Source GameObjects Kept (renderers disabled) Destroyed at bake
Per-instance link components Yes (BRGGameObjectLink) None
Native transform tracking Yes (auto-syncs to GPU when transforms move) No
Storage size Higher Lower (~44 bytes per instance)
Per-instance scene edits Yes No (re-bake or Expand first)
Best for Static or runtime-movable groups that still need editor selectability Large static groups where overhead matters (forests, props, debris)

Inspector Properties

Property Type Default Description
Chunk Mode enum Static (Multi Chunk) Controls how instances are spatially organized. See Chunk Modes on the GameObject Group page — the same modes apply here.
Chunk Size (m) float 256m World-space size of the spatial grid cells. Only shown for Static (Multi Chunk) mode.
Chunk Cull Distance (m) float 0 Max render distance per chunk. 0 = no distance culling. Hidden in Dynamic Global Chunk mode.
Detect Prefab Overrides bool false When enabled, instances with property overrides (e.g. swapped material, custom shadow settings, BRG Prototype Extra Data differences) bake as separate prototypes. When disabled, all instances of the same prefab share one prototype and overrides are ignored. Only shown before baking.

Inspector Actions

Button When Description
Bake Children Before bake Walks all children, packs each LODGroup or standalone MeshRenderer as a baked instance, then destroys the source GameObjects. Shows a confirmation dialog. Not undoable — back up your scene first.
Expand to GameObjects After bake Recreates editable GameObjects from the baked data. If the original was a prefab, the prefab is re-instantiated (preserving the prefab link). For non-prefab content, GameObjects are reconstructed from the stored mesh/material data.

You can also bake directly from the hierarchy context menu: GameObject > BRG > Convert to BRG Instances (Instance Group, removes original GameObjects). This creates a new BRG Instance Group, parents the selection under it, and bakes immediately.

What Bake Preserves and Loses

Baking captures only what BRG needs to render. Anything else on the source GameObjects is lost.

Preserved:

  • World-space position, rotation, scale (lossy scale)
  • Mesh, materials, LOD layout, motion vector mode, shadow casting mode, rendering layer mask, layer
  • LOD reference size and fade mode
  • Per-prototype settings from any BRG Prototype Extra Data on the source (shadow cascade, density, screen-size cull, etc.)
  • Prefab asset reference (used by Expand to re-instantiate the original prefab)

Lost:

  • GameObject names, tags, layers beyond what BRG uses
  • Extra components (colliders, scripts, audio sources, lightmap indices, etc.)
  • Per-instance material property block overrides
  • Anything outside the renderer/LODGroup hierarchy

Status Display

After baking, the inspector shows:

  • Instances — total baked instance count
  • Prototypes — number of unique render signatures

Runtime Properties

Property Type Description
IsBaked bool true after baking, false before bake or after Expand.
InstanceCount int Total baked instance count.
PrototypeCount int Number of unique render signatures.

How It Works

  1. Bake walks each direct child's hierarchy. Every LODGroup and every standalone MeshRenderer (one not claimed by a LODGroup) becomes one BRG instance.
  2. Render signatures are extracted via the registration tracker and deduplicated. With Detect Prefab Overrides off, prefab instances dedupe by prefab identity (overrides ignored). With it on, instances that differ from their base prefab get distinct signatures.
  3. Each instance's world transform is packed into a 44-byte record (position, rotation, scale, local prototype index).
  4. The packed blob and the signature snapshots are stored on the component as serialized data.
  5. The source GameObjects are destroyed.
  6. At runtime (or in the editor with ExecuteAlways), OnInitialize registers the snapshotted signatures with BRGRenderer, allocates chunks based on the chosen Chunk Mode, and uploads the unpacked instance data.

When to Use

Use BRG Instance Group for:

  • Large counts of static decorative props (tens of thousands of trees, rocks, debris, etc.)
  • Groups where you'd otherwise want to "flatten" or strip the GameObjects for memory reasons
  • Scenes where you never need to script per-instance edits at runtime

Use BRG GameObject Group instead when:

  • Instances may move at runtime and need automatic transform sync
  • You want to keep selecting and editing individual instances in the Scene View
  • You need other components (colliders, scripts) on each instance

Notes

  • Bake permanently modifies the scene. The dialog warns you — back up first.
  • Expand to GameObjects is the safety valve — you can always recover an editable hierarchy from the baked data (modulo the lost extras listed above).
  • The Chunk Mode default differs from BRG GameObject Group (Static (Multi Chunk) here, Static (Single Chunk) there) because Instance Group is intended for large groups.
  • Per-prefab settings (shadow optimization, density, crossfade) are read from BRG Prototype Extra Data on the source prefab at bake time and frozen into the signature.