Skip to content

BUG: [UiParticleSystem] Using UnscaledDeltaTime causes performance freeze on Application Foreground #486

Description

@gagbaghdas

Unity UI Extensions Bug Report

Describe the bug

In the UiParticleSystem class the following line pSystem.Simulate(Time.unscaledDeltaTime, false, false, true); in the Update method causes freeze, if there is a particle system with looping in the scene, and the app comes back from the background. The reason is the usage of the unscaledDeltaTime , because let's say the game was in background for 1h, then the unscaledDeltaTime is being 3600, and simulation takes for example 20 seconds in the very 1st frame after application resumed. Changing it to DeltaTime solves the issue, but maybe you guys will provide more robust solution , as even though our game doesn't really need to use the unscaledDeltaTime, but maybe others do.

To Reproduce

  1. Have a particle system in the scene , with looping enabled, and let's say 100 max particles
  2. Put app into background
  3. Wait for some time ( freeze duration depends on the time the app was in background, so for noticeable freeze, you can wait 30mins at least)
  4. Bring back the app to foreground
  5. Notice the 1st frame hang, because of the long running pSystem.Simulate(Time.unscaledDeltaTime, false, false, true) method.

Expected behavior

1st frame after application returned from background should not hang

Actual behavior

It hangs :D

Screenshots

Your Setup

  • Operation System:
    • Windows
    • MacOs
    • Linux
    • Other
  • Unity Version: 2022.3.22f
  • Unity UI Extensions Version
    • 2.3.2

Additional context

Activity

  1. changed the title [-]BUG: Using `UnscaledDeltaTime` causes performance freeze on Application Foreground[/-] [+]BUG: [UiParticleSystem] Using `UnscaledDeltaTime` causes performance freeze on Application Foreground[/+] on Jan 21, 2025
  2. SimonDarksideJ commented on Jun 16, 2026

    @SimonDarksideJ
    Contributor

    Issue was related to unbound delta time and fixedTimeStep use. Control updated with a "Culling Mode" option to react as desired.
    Has to be opt in so the developer understands the impacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions