Search Issue Tracker
By Design
Votes
4
Found in
2021.3.50f1
2022.3.60f1
6000.0.43f1
6000.1.0b11
6000.2.0a7
6000.3.0a1
Issue ID
UUM-100221
Regression
No
Performance decreases significantly when instantiating a Prefab with many children
How to reproduce:
1. Open the “IN-96996_repro“ project
2. Open the “SampleScene“
3. Enter Play Mode and press the Space key
4. Observe the FPS
Expected results: No significant change is seen
Actual result: FPS decreased significantly
Reproducible with: 2021.3.50f1, 2022.3.60f1, 6000.0.43f1, 6000.1.0b11, 6000.2.0a7
Reproducible on: Windows 10
Not reproducible on: No other environment tested
Note:
- Reproducible in Player
- Reproducible after the animators were removed
- The decrease in performance is larger in 2021.3 and 2022.3 streams
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
The issue in the project is that there are over 200 Skinned Mesh Renderers being instantiated.
Skinned mesh renderers are notoriously expensive, and in this project there are over 10,000 draw calls being emitted when the "Platform" prefab is instantiate. The recommended approach is to use instancing coupled with either Vertex Animation Textures (VAT) or Bone Animation Textures (BAT).
There are a number of open source tools that allow for VAT creation:
VATBaker: https://github.com/Mamantenok1599/UnityVATBaker
And for BAT creation:
BoneAnimationTexture (BAT): https://github.com/mbmtrex/Bone-Animation-Texture-BAT
These improve the frame rate significantly and allow for a more characters to be placed on screen without incurring a large performance cost.
There's an additional article about VAT here: https://medium.com/tech-at-wildlife-studios/texture-animation-techniques-1daecb316657