Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prewarm doesn't work(?) #339

Open
PeterBacall opened this issue Nov 1, 2024 · 5 comments
Open

Prewarm doesn't work(?) #339

PeterBacall opened this issue Nov 1, 2024 · 5 comments
Assignees
Labels
bug Something isn't working need more info

Comments

@PeterBacall
Copy link

Describe the bug
Prewarm doesn't seem to work?
I have a disabled UI window that contains a particle system. Whenever I enable the UI window, the particle system restarts, ignoring "Prewarm" toggle in the Particle System,.

Expected behavior
When I enable the UI window, I want the particle system to be prewarmed, meaning looping particles have already filled had some time to accumulate (as if emitted for one loop cycle), and are not starting from the beginning.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Version 4.10.1
  • Platform: macOS (m1)
  • Unity version: Unity 6000.0.25f1
@PeterBacall PeterBacall added the bug Something isn't working label Nov 1, 2024
@mob-sakai
Copy link
Owner

Thank you for your reporting!
The issue is not reproduced on my environment...
2024-11-02 9.17.54.webm

Could you please attach a minimal project (included Assets, Packages and ProjectSettings directories) that reproduces the issue?
Of course, you don't need to include any secret assets from your project. Feel free to use free assets instead.

repos

@PeterBacall
Copy link
Author

First of all, never thanked you for creating such a great asset, just wanted to let you know that. All the hard work is really appreciated. Thank you!

Back to topic, funnily I can't reproduce the issue in a new project, seems to be something very specific with my project (which is very big), not sure what to do. I'll attach a video if that helps.
In the beginning of the video I press "Play" in the Particle System panel, which makes restart, "Prewarm" seems to work. Later in the video I disable the game object and enable it again, the Particle System restarts. This does not reproduce in a new/empty project. So probably a issue on my end.

Screen.recording.mov

@mob-sakai
Copy link
Owner

I have a similar experience, so I’d like you to try the following:

  1. Click Game Object > UI > Particle System to place a new UI particle in the UI window.
  2. Enable prewarm on the Particle System.
  3. When activated, does prewarm work?

If it works, then it’s a Unity bug.
Try creating a new particle system and copying over the properties.

@PeterBacall
Copy link
Author

I have a similar experience, so I’d like you to try the following:

  1. Click Game Object > UI > Particle System to place a new UI particle in the UI window.
  2. Enable prewarm on the Particle System.
  3. When activated, does prewarm work?

If it works, then it’s a Unity bug. Try creating a new particle system and copying over the properties.

I found the issue, if the “Duration” is set to 1 (or some other low value like 2), while Start Lifetime is set to a higher value, like 5. Prewarm no longer work.
Now, if Duration is set to 2.5, and Start Lifetime is set to 5, with Prewarm enabled... it starts halfway through the cycle, and only if Duration is set to 5, it will start “Prewarmed”, meaning a full cycle has been played.

Copying the Particle System to a new particle system would not work.

  1. Create new ui particle system
  2. Set Duration to 1, leave Start Lifetime at 5, and enable Prewarm
  3. Play, notice how it starts from the beginning.
  4. Now set Duration to 2.5
  5. Play, notice how it starts from the middle of the cycle

Conclusion/Solution:
When Prewarm is enabled, Duration has to be the same value as Start Lifetime for it to work.

@mob-sakai
Copy link
Owner

Wow, that's interesting.
Thank you for your research. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more info
Projects
None yet
Development

No branches or pull requests

2 participants