EmissionControl
A class in Root.Township, the global namespace.
Pooled effect that scales the emission rate of a set of particle systems. It turns emission off when released to the pool and back on when requested again.
- Listed in Global namespace: E to H
- Inherits or implements
DelayedPooledObject,IBuildRendererPostBake,IBuildBakeable - Derived types
EmissionShapeControl - Nested types
InitialValues
Constructors
| Member | What it is |
|---|---|
EmissionControl() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|---|
protected ParticleSystem[] systemsToChange | The particle systems whose emission this component scales. Set in the inspector. |
1 private and internal field
| Member | What it is |
|---|---|
private EmissionControl.InitialValues[] initialValues | Starting rate over time and rate over distance for each system, captured in SetupSystems. |
Methods
| Member | What it is |
|---|---|
override void Release() | Sets emission to zero, unparents the object and returns it to the pool. |
void SetEmissionMultiplier(float value) | Scales rate over time and rate over distance of every system by the value, relative to their starting rates. |
protected virtual void ResetSystems(PooledObject pooledObject) | Hooked to the pool's Requested event; restores emission to full (multiplier 1). |
protected virtual void SetupSystems() | Subscribes ResetSystems to Requested and stores each system's starting emission rates. |
2 private and internal methods
Used in
Members of other types that take, return or hold a EmissionControl: