Class GTreePrototype
A template containing information about a kind of tree.
[Serializable]
public class GTreePrototype
- Inheritance
-
GTreePrototype
- Inherited Members
Properties
- BaseBounds
Bounding box of the tree mesh.
- BaseRotation
Initial rotation of each tree. This will be combined with per-instance rotation on rendering. You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- BaseScale
Initial scale of each tree. This will be combined with per-instance scale on rendering. You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- Billboard
Billboard asset for the tree. You can create one with the Billboard Creator tool in the editor. You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- BillboardReceiveShadow
Should it receive shadow when rendered as billboard? You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- BillboardShadowCastingMode
Should it cast shadow when rendered as billboard? You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- ColliderInfo
Describe the capsule collider attached to this tree.
- HasCollider
True if the provided prefab has a Capsule Collider attached.
- HasLod0
Check if it has enough info to render at LOD0
- HasLod1
Check if it has enough info to render at LOD1
- IsValid
Does it have enough info for rendering?
- KeepPrefabLayer
If on, it will use the source prefab layer. You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- Layer
The layer to render this tree in. You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- PivotOffset
Offset the tree position along Y axis on rendering. You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- Prefab
The tree prefab, should contain all neccessary component such as Mesh Filter, Mesh Renderer, Capsule Collider. LODGroup component is not supported, instead it will take the first and second mesh renderer for its LOD0 and LOD1 You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- ReceiveShadow
Should it receive shadow? You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- ShadowCastingMode
Should it cast shadow? You have to call the GTreePrototypeGroup.NofifyChanged() to refresh the renderer.
- SharedMaterials
The materials for rendering at LOD0, get from provided prefab.
- SharedMaterialsLod1
The materials for rendering at LOD1, get from provided prefab.
- SharedMesh
The mesh for rendering at LOD0, get from provided prefab.
- SharedMeshLod1
The mesh for rendering at LOD1, get from provided prefab.
Methods
- Create(GameObject)
Create a new prototype from a game object or prefab.
- Refresh()
Read the prefab and refesh all settings.
Operators
- explicit operator TreePrototype(GTreePrototype)
Cast to Unity's tree prototype.
- explicit operator GTreePrototype(TreePrototype)
Cast from Unity's tree prototype.