Class GGrassPatch
Contains data about grass instances of a terrain within a region. This should not be used alone without a parent GFoliage object. Don't instantiate it. The correct way to access this is terrain.TerrainData.Foliage.GrassPatch[index]
[Serializable]
public class GGrassPatch
- Inheritance
-
GGrassPatch
- Inherited Members
Properties
- Bounds
Bounding box of this patch in normalized [0,1] space.
- Foliage
The parent object this patch belongs to.
- Index
Index of this patch in the patch grid.
Methods
- AddInstances(IEnumerable<GGrassInstance>)
Add some instances to this patch. It's recommended to use Polaris.AddGrassInstances() or GFoliage.AddGrassInstances() instead.
- ClearInstances()
Erase all grass instances from the patch.
- GetUvRange()
Get the UV rect of this patch relative to its parent terrain.
- RecalculateBounds()
Update the patch bounds in normalized space.
- RemoveInstances(Predicate<GGrassInstance>)
Remove grass instances from this patch that match a condition. It's recommended to use Polaris.RemoveGrassInstances() instead.