mob-sakai / mob-sakai/ParticleEffectForUGUI

Particles break on application pause or on android native ui showing unscaled time

Open
#362 1 comment 0 reactions 1 assignee View on GitHub

@mob-sakai is already working on this.

Since Apr 2, 2025.

bug
Dominant language
C#
Stars
6k
Forks
762
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
On pausing the application via shortcut particles disappear or stop working.
This also happens when android native ui shows during playing particles.
Have not tested iOS.

My particles are using an attractor, but that doesn't seem to make a difference.
It seems like time scale is not working correctly. Without attractor it jumps ahead

if unscaled this seems to fix it a bit for big unscaled time jumps
deltaTime = Mathf.Min(deltaTime, 0.05f);
Looking into a more elegant solution

To Reproduce
add particle with attractor
set particle to non loop and lower duration to around 1s and start lifetime around 5s
pause application with shortcut key while particles are playing
resume application with shortcut key
(seems to work when using pause play buttons)

On mobile
play particles
minimize application on device while particles playing
re-open application while particles playing

Expected behavior
Particles should resume normally

Screenshots
https://imgur.com/a/gBsajJ1

Environment (please complete the following information):

  • Version 4.11.2
  • Platform: Editor, Android
  • Unity version: 6.41 LTS

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.