Table of Contents

Class GGrassPrototype

Namespace
Pinwheel.Griffin
Assembly
Pinwheel.Polaris.Runtime.dll

A template containing common data for a type of grass.

[Serializable]
public class GGrassPrototype
Inheritance
GGrassPrototype
Inherited Members

Properties

AlignToSurface

Should this type of grass aligns its normal vector to the surface orientation? This value is used when performing grass snapping.

BendFactor

How much it react to wind. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

Color

Tint color for this type of grass. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

CustomMesh

The mesh to use for render in Shape.CustomMesh mode. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

CustomMeshLod1

The mesh to use for render in Shape.CustomMesh mode, when an instance is far from camera. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

DetailMaterials

Materials used for rendering in Detail Object mode, retrieve from provided prefab.

DetailMaterialsLod1

Materials used for rendering in Detail Object mode when an instance is far from camera, retrieve from provided prefab.

DetailMesh

The mesh used for rendering in Detail Object mode, retrieve from provided prefab.

DetailMeshLod1

The mesh used for rendering in Detail Object mode when the instance is far from camera, retrieve from provided prefab.

HasLod0

Does it have enough info (mesh/material) to render at LOD0?

HasLod1

Does it have enough info (mesh/material) to render at LOD1?

IsBillboard

Should this grass type rendered as billboard? Billboard works best with Quad shape. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

Layer

The object layer used for rendering. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

PivotOffset

Offset the instance height along Y-axis on rendering. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

Prefab

The prefab to render in Detail Object mode. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

ReceiveShadow

Should this type of grass receive shadow? You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

ShadowCastingMode

Should this type of grass cast shadow? You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

Shape

Shape of the grass, each shape use different mesh for rendering. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

Size

Base size of grass instance. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

Texture

The texture to render grass. You should call GGrassPrototypeGroup.NotifyChanged() to refresh the renderer.

Methods

Create(GameObject)

Create a new prototype from a prefab. This prototype will be rendered as Detail Object.

Create(Texture2D)

Create a new prototype from a grass texture.

Equals(DetailPrototype)
GetBaseMesh()

Get the mesh that will be used for rendering at LOD0.

GetBaseMeshLod1()

Get the mesh that will be used for rendering at LOD1.

RefreshDetailObjectSettings()

Refresh rendering info (mesh/material) from prefab.

Operators

explicit operator DetailPrototype(GGrassPrototype)

Cast to Unity's Detail Prototype

explicit operator GGrassPrototype(DetailPrototype)

Cast from Unity's Detail Prototype