Class TreeAsset
Related to:SoyWar.SimplePlantGrowth
/
Inherits from:objectObjectScriptableObjectPlantAsset<TreeAsset>
/
Implemented in:SoyWar.SimplePlantGrowth.dll
Syntax
[CreateAssetMenu(fileName = "Tree Growth Phase", menuName = "Simple Plant Growth/Tree", order = 1002)]
public sealed class TreeAsset : PlantAsset<TreeAsset>
Properties
Name | Description |
---|---|
BendFactor | Bend factor of the tree prototype. |
NavMeshLod | The LOD index of a Tree LODGroup that Unity uses to generate a NavMesh. It uses this value only for Trees with a LODGroup, and ignores this value for regular Trees. |
Operators
Name | Description |
---|---|
implicit operator TreeData(TreeAsset) | Convert TreeAsset to TreeData. |
implicit operator TreePrototype(TreeAsset) | Convert TreeAsset to TreePrototype. |
implicit operator TreeAsset(TreePrototype) | Convert TreePrototype to TreeAsset. |
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. |