Search Issue Tracker

By Design

Votes

0

Found in

2022.3.63f1

6000.0.51f1

6000.1.9f1

6000.2.0a7

6000.4.0a1

Issue ID

UUM-110051

Regression

No

Some particles do not disappear when setting the particle remainingLifetime property to 0

-

How to reproduce:
1. Open the attached “IN-105399” project
2. Open the “SampleScene” Scene
3. In the Hierarchy window select the “Particles” GameObject
4. Enter Play mode
5. In the Scene view use the Move tool red arrow to move the “Particles” GameObject away
6. Observe the remaining particles in the Scene view

Expected result: All of the newly created particles dissapear after some time
Actual result: Some particles get stuck and do not disappear

Reproducible with: 2022.1.0a1, 2022.3.63f1, 6000.0.51f1, 6000.1.9f1, 6000.2.0a7

Reproduced on: Windows 11
Not reproduced on: No other environment tested

Notes:
- The reproduction is not consistent and might take some tries until the particles get stuck
- The remaining particles disappear if you unselect and then select the “Particles” GameObject again

  1. Resolution Note:

    Hi!
    There is an error on the user provided code.
    In the Particles.cs script, the last line of Update is:
    _particleSystem.SetParticles(_particles);
    This will set ALL the particles in the buffer, even those that already died.
    When doing GetParticles we receive the actual particle count, which should be used when setting back the particles, like this:
    _particleSystem.SetParticles(_particles, particleCount);
    Hope that clarifies the usage of this method.
    Thanks!

Add comment

Log in to post comment