Search Issue Tracker
Fixed in 2022.1.X
Votes
1
Found in
2018.4
2020.2
2020.2.0b5
Issue ID
1282612
Regression
No
Unused prefab data not being cleaned when removing script through override
Reproduction steps:
1. Create new project and import Script2
2. Create an empty Gameobject and add the Script2 component
3. Make the Script2's array be 10,000 in length
4. Turn the Gameobject into a prefab
5. Press randomize on the prefab instance in the scene (creating 10,000 prefab overrides) and save the scene
6. Open the prefab, then delete the Script2 component
7. Save and exit the prefab editor
8. Observe the performance of the original prefab by moving and undoing
Expected result: Unused data gets cleared
Actual result: Prefab retains unused, unreachable data slowing down performance
Reproducible with: 2018.4.28f1, 2019.4.11f1, 2020.1.8f1, 2020.2.0b6
Notes: Seems to also be caused by:
- Commenting/removing the array in the script.
- Changing the array length in the prefab
- Changing the array length in the instance
- Removing the script in the instance (creating a removal override)
Array size should be increased if prefab performance difference is not noticeable
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
- [VFX Graph] Base Color Map Inconsistency between Lit and Unlit Ouput
- [HDRP] Water is using the wrong depth when calculating absorption for alpha clipped transparents with depth prepass enabled
- [VFX Graph] Emissive isn't working with Decal output
- Gizmos are not drawn in Game view and Render Graph Execution errors are shown when stacked Overlay Camera is used and 'Compatibility Mode' is disabled
- Crash on WalkTypeTreeInternal when selecting the Texture of a specific FBX
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a16