A class in Root.Township, Alta.Environmental.Vegetation.
Editor tool that holds generated grass blades and merges them into clump meshes.
Constructors
| Member | What it is |
|---|
GrassClumpHolder() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private List<GrassBlade> blades | Blades held so far. |
private float width | How far from the centre blades are scattered. |
Methods
| Member | What it is |
|---|
void Clear(float _width) | Sets the scatter width and destroys every blade and child. |
Mesh GenerateLOD2() | Merges all blades into one mesh cut down to about two triangles each, for a far LOD. |
Mesh GenerateTemplate(int maxLevels) | Merges all blades into one mesh, trimming each to at most 2 * maxLevels - 1 triangles. |
void ReceiveBlade(GrassBladeMesh mesh, Material grassMaterial, bool isUnique) | Adds a blade from a blade mesh at a random spot within width (or the centre if unique) with a random turn. |
2 private and internal methods
| Member | What it is |
|---|
private void OnDestroy() | Empty. |
private void OnDrawGizmos() | Empty. |