ParticleEffectDistanceController
A class in Root.Township, the global namespace.
Shortens the life of world-space particles that drift too far from this object. Checks every few frames; removed on headless servers.
- Listed in Global namespace: P
- Inherits or implements
MonoBehaviour - Nested types
ParticleSystemEvaluator
Constructors
| Member | What it is |
|---|---|
ParticleEffectDistanceController() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
6 private and internal fields
| Member | What it is |
|---|---|
private int evaluatorCount | Number of evaluators. |
private ParticleEffectDistanceController.ParticleSystemEvaluator[] evaluators | One per world-space child particle system. |
private int frameCount | Frame counter for the update interval. |
private float maxDistanceSquared | Squared distance past which particles are cut short. |
private float remainingLifetimeWhenFar | Backing field for RemainingLifetimeWhenFar. |
private int updateFrameCount | Frames between checks (default 15). |
Properties
| Member | What it is |
|---|---|
float RemainingLifetimeWhenFar { get; } | Remaining lifetime given to particles beyond the max distance. |
Methods
3 private and internal methods
Used in
Members of other types that take, return or hold a ParticleEffectDistanceController: