ParticleEffectForUGUI icon indicating copy to clipboard operation
ParticleEffectForUGUI copied to clipboard

Auto-pause particle mesh update and bake when off-screen

Open zhiyangyou opened this issue 6 months ago • 1 comments

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:

  1. The UIParticle component subscribes to the onCullStateChanged event of each of its UIParticleRenderers.

  2. 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.

zhiyangyou avatar Jul 30 '25 12:07 zhiyangyou

Thank you for your reporting!

mob-sakai avatar Aug 08 '25 09:08 mob-sakai