GameObjects
The BRG Instance Group component is the primary way to render placed prefab instances through BRG Instanced Renderer. It converts a hierarchy of prefab instances into serialized GPU-ready chunks, with zero runtime transform scanning.
Setup
1. Organize Your Instances
Create an empty GameObject in your scene to act as the parent. Place your prefab instances as direct children of this object.
All children should be instances of prefabs that have a Mesh Renderer (and optionally a LOD Group). You can mix different prefab types under the same parent.
2. Add the Component
Add the BRG Instance Group component to the parent GameObject.
3. Configure Settings
| Setting | Description |
|---|---|
| Chunk Size | The spatial grid cell size in meters (default: 50m). Instances are grouped into chunks based on their position. Smaller values create more chunks with fewer instances each, which improves culling precision but adds chunk-level overhead. |
| Cull Distance | Maximum render distance in meters. Instances beyond this distance are not rendered. Set to 0 for no distance limit. |
4. Convert
Click Convert Children to Instances in the inspector. This:
- Groups instances into spatial chunks based on position and chunk size
- Serializes instance data (position, rotation, scale, prototype) into the component
- Disables the Mesh Renderers and LOD Groups on the source GameObjects
- Adds a BRG Instance Link component to each source object for tracking
After conversion, the instances are rendered entirely through BRG Instanced Renderer. The source GameObjects remain in the hierarchy for reference and editing.
Editing After Conversion
If you move, add, or remove source objects after converting, click Refresh in the inspector to rebuild the chunk data.
To revert back to standard Unity rendering, click Revert to GameObjects. This re-enables the original Mesh Renderers and LOD Groups.
Per-Prefab Settings
For fine-grained control over individual prefab types (shadow optimization, LOD crossfade, dynamic density), add a BRG Prototype Extra Data component to the prefab asset itself. These settings are picked up automatically during conversion.
Scene View Gizmos
When Show Chunk Gizmos is enabled, wireframe boxes are drawn in the Scene View showing each chunk's bounds. The color indicates fill percentage, and labels show the instance count per chunk.
Tips
- Chunk size should roughly match the density of your instances. Dense forests might use 25–50m chunks, while sparse prop placement might use 100m+.
- Cull distance works well in combination with dynamic density for gradual falloff before the hard cutoff.
- BRG Instance Group serializes chunk data into the scene, so startup is instant with no runtime scanning cost.