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
- Popup windows spawn on the incorrect monitor when the Editor is placed near the boundary of scaled monitor next to a monitor with different scaling
- Hidden Tabs do not shift into empty space after closing visible Tabs
- [Android] Application not deployed on a device when "activity-alias" is used in the AndroidManifest
- Shader compile process adds shader ID to the constant buffer name when the word "Globals" is being used in Vulkan
- Audio Mixer Snapshot link to the documentation isn’t working
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a16