Skip to main content

MassLODSetter

A class in Root.Township, the global namespace.

Editor tool that sets LOD transition heights, LOD group size or child transforms on every LODGroup under it, through inspector buttons.

Constructors​

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

Fields​

6 private and internal fields
MemberWhat it is
private List<LODGroup> lodGroupsCached child LOD groups.
private float[] LODIndexFinishesAtScreen height at which each LOD level ends; kept in falling order.
private float lodSizeSize used by the Set Bounds button.
private bool recalculateBoundsSet Bounds button.
private bool resetLODElementsTransformReset children transform button.
private bool updateLODSettingsApply Settings button.

Methods​

MemberWhat it is
void RecalculateBounds(float size)Sets the size of every child LOD group.
void ReseltLODTransforms()Resets the local transform of every direct child of each LOD group.
1 private and internal method
MemberWhat it is
private void OnValidate()Keeps the heights falling and runs whichever inspector button was pressed.