HierarchyDecorator icon indicating copy to clipboard operation
HierarchyDecorator copied to clipboard

Bug - Performance degradation in play mode with many objects being activated/deactivated

Open tivec opened this issue 2 years ago • 0 comments

Current Unity version used 2022.1.6f1

Describe the bug In my game, I use an object pool for spawning bullets. When a lot of them are being spawned and despawned, the performance degrades significantly in play mode.

To Reproduce (If applicable)

  1. Spawn and despawn a lot of objects rapidly during play mode.
  2. Watch the stats screen in the editor.
  3. Add HierarchyDecorator.
  4. Repeat steps 1-2 and see the performance drop

Screenshots First video is without the HierarchyDecorator https://user-images.githubusercontent.com/717574/179356429-33b16cef-3aec-49da-bbec-4629e6ee3253.mp4

Second video shows With the HierarchyDecorator. https://user-images.githubusercontent.com/717574/179356498-5310ca1f-3107-4a68-8b37-c525c24b19ee.mp4

Additional context My laptop is unfortunately not a very strong one, but it is a significant difference between the two options.

tivec avatar Jul 16 '22 13:07 tivec