A class in Root.Township, the global namespace.
Editor tool: when isGoing is ticked in the inspector, it builds a LODGroup from the lods prefabs plus a mesh-collider copy of LOD 0, then removes itself.
Constructors
| Member | What it is |
|---|
CreateLOD() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private bool isGoing | Inspector toggle that triggers the build. |
private GameObject[] lods | Prefabs to instantiate as LOD 0, 1, 2 and so on, with transition heights spread from 0.8 down to 0.01. |
Methods
2 private and internal methods
| Member | What it is |
|---|
private void DestroyEditor(Object target) | Meant to destroy an object in the editor; empty in this build, so nothing is removed. |
private void OnValidate() | Does the LOD build when isGoing is set and no LODGroup exists yet, then clears isGoing. |