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
| Member | What it is |
|---|
ProgressMaterialEffect() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private MeshFilter filter | Mesh filter for the shown mesh. |
private Material material | This effect's material copy. |
private AnimationCurve progressOverTime | Curve for _Progress over the effect's life. |
private MeshRenderer renderer | Renderer for the mesh. |
private readonly int shaderProgress | Shader property id for _Progress. |
Methods
| Member | What 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. |