-
-
Notifications
You must be signed in to change notification settings - Fork 709
Description
Automatically pause the particle system's mesh updates when all of its associated UIParticleRenderer components are off-screen (culled by the Canvas or RectMask2D).
This auto-pause feature should be optional and controllable via a toggle/checkbox in the UIParticle's Inspector panel.
A possible implementation approach could be:
-
The UIParticle component subscribes to the onCullStateChanged event of each of its UIParticleRenderers.
-
When the CanvasRenderer.cull property of a UIParticleRenderer changes, this event would trigger a check within the UIParticle component (e.g., a method like CheckOffScreen).
3.If all renderers are culled, the UIParticle would then pause the particle system's mesh updates and the baking process. When at least one renderer becomes visible again, the updates would resume.