HierarchyDecorator
HierarchyDecorator copied to clipboard
Bug - Performance degradation in play mode with many objects being activated/deactivated
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)
- Spawn and despawn a lot of objects rapidly during play mode.
- Watch the stats screen in the editor.
- Add HierarchyDecorator.
- 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.