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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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!