Skip to main content

BakeLODGroupGrouper

A class in Root.Township, Alta.Utilities.

Bake-time component that merges the LODGroups of its children into one LODGroup on this object. The impostor baking step is empty in this build.

Constructors​

MemberWhat it is
BakeLODGroupGrouper()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

8 private and internal fields
MemberWhat it is
private int axisFramesImpostor setting: frames per axis (default 16).
private bool btnBakeInspector button that runs Bake.
private bool forceBakeEveryTimeImpostor setting: probably rebakes the impostor on every bake. Unused in this build.
private ImpostorType impostorTypeImpostor setting: projection type, octahedron by default.
private bool isBakingImpostorWhether Bake also bakes an impostor (on by default).
private LODReplacement lodReplacementImpostor setting: which LOD level the impostor replaces, the culled level by default.
private int pixelPaddingImpostor setting: padding in pixels (default 32).
private int textureSizeImpostor setting: texture size in pixels (default 1024).

Properties​

MemberWhat it is
bool IsBaked { get; set; }Set to true once Bake has run.

Methods​

MemberWhat it is
void Bake()Merges child LOD groups level by level into one on this object, removes the child groups, and keeps each level's transition height below the one before.
1 private and internal method
MemberWhat it is
private void BakeImpostor(LODGroup lodGroup, Renderer[] lod0Renderers)Meant to bake an impostor from the LOD0 renderers. Empty in this build.