Class GrassAsset
Related to:SoyWar.SimplePlantGrowth
/
Inherits from:objectObjectScriptableObjectPlantAsset<GrassAsset>
/
Implemented in:SoyWar.SimplePlantGrowth.dll
Syntax
[CreateAssetMenu(fileName = "Grass Growth Phase", menuName = "Simple Plant Growth/Grass", order = 1001)]
public sealed class GrassAsset : PlantAsset<GrassAsset>Properties
| Name | Description |
|---|---|
| AlignToGround | Rotate detail axis parallel to the ground's normal direction, so that the detail is perpendicular to the ground. |
| DetailDensity | Controls detail density for this detail prototype, relative to it's size. |
| DryTint | Tint when the grass is "dry". |
| HealthyTint | Tint when the grass is "healthy". |
| HoleEdgePadding | Controls how far away detail objects are from the edge of the hole area. |
| NoiseSeed | Specifies the random seed value for detail object placement. |
| NoiseSpread | Controls the spatial frequency of the noise pattern used to vary the scale and color of the detail objects. |
| PositionJitter | Controls how Unity generates the detail positions. |
| RandomTint | Activates random tint. |
| RenderMode | Render mode for the DetailPrototype. |
| TargetCoverage | Controls the detail's target coverage. |
| Texture | Texture used by the DetailPrototype. |
| Tint | Grass tint. |
| UseDensityScaling | Indicates the global density scale set in the terrain settings affects this detail prototype. |
| UseInstancing | Indicates whether this detail prototype uses for rendering. |
| UsePrototypeMesh | Checks whether prototype must be used instead of texture. |
Operators
| Name | Description |
|---|---|
| implicit operator GrassData(GrassAsset) | Convert GrassData to GrassAsset. |
| implicit operator DetailPrototype(GrassAsset) | Convert GrassAsset to DetailPrototype. |
| implicit operator GrassAsset(DetailPrototype) | Convert DetailPrototype to GrassAsset. |
Inherited Members
Properties
| Name | Description |
|---|---|
| Destroy | Destroys the plant when moving on to the next phase. |
| GrowthTime | Growth time. |
| HasNextStep | Check whether the next phase leads to plant growth or destruction. |
| Height | Height |
| LockWidthToHeight | Locks width to height. |
| MaxGrowthTime | Maximum growth time. |
| MaxHeight | Maximum height. |
| MaxWidth | Maximum width. |
| MinGrowthTime | Minimum growth time. |
| MinHeight | Minimum height. |
| MinWidth | Minimum width. |
| Next | The next phase of plant growth. |
| Prototype | GameObject associated with the plant. |
| RandomGrowthTime | Activates random growth time. |
| RandomHeight | Activates random height. |
| RandomWidth | Activates random width. |
| Ratio | Ratio between width and height. |
| Width | Width |
Methods
| Name | Description |
|---|---|
| CopyFrom(T) | Copy data from another instance to this one. |
| Duplicate() | Create a copy of asset. |
| SetMinMaxGrowthTime(float, float) | Defines the random range of growth time. |
| SetMinMaxHeight(float, float) | Defines the random range of height. |
| SetMinMaxWidth(float, float) | Defines the random range of width. |
| ToData() | Convert toIPlantData<T>. |
| Validate() | Checks whether asset is valid. |
| Validate(out string) | Checks whether asset is valid. |
