Skip to main content

ParticleMeshReplacePooledObject

A class in Root.Township, the global namespace.

A pooled mesh-replace effect that shows the mesh through particle system renderers and waits a while before going back to the pool.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private AltaCoroutine releaseRoutineThe running release timer, if any.
private float releaseTimeSeconds before the object returns to the pool (1 by default).
private ParticleSystemRenderer[] renderersParticle renderers that show the mesh.

Methods​

MemberWhat it is
override void Setup(Mesh mesh, Material material)Sets the mesh and material on every particle renderer.
3 private and internal methods
MemberWhat it is
private void Awake()Hooks the pool's Requested event to start the delayed release.
private IEnumerator DelayedRelease(float releaseTime) (iterator)Coroutine that waits releaseTime seconds and then releases the object to the pool.
private void DelayRelease(PooledObject pooledObject)Restarts the release timer whenever the object is taken from the pool.