Skip to main content

ProgressMaterialEffect

A class in Root.Township, the global namespace.

Client: a timed effect that shows a mesh and animates its material's _Progress over its lifetime, then releases.

Constructors​

MemberWhat it is
ProgressMaterialEffect()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

5 private and internal fields
MemberWhat it is
private MeshFilter filterMesh filter for the shown mesh.
private Material materialThis effect's material copy.
private AnimationCurve progressOverTimeCurve for _Progress over the effect's life.
private MeshRenderer rendererRenderer for the mesh.
private readonly int shaderProgressShader property id for _Progress.

Methods​

MemberWhat it is
void Initialize(Mesh mesh)Sets the mesh to show.
override void Release()Releases the effect and clears the mesh.
protected override void Awake()Makes its own copy of the material.
protected override IEnumerator Destroy() (iterator)Coroutine that drives _Progress along progressOverTime for the effect's duration, then releases.