Search Issue Tracker
Not Reproducible
Votes
0
Found in
2022.3.60f1
6000.0.45f1
6000.1.0b13
6000.2.0a8
Issue ID
UUM-101900
Regression
No
Missing Script References are not removed from GameObjects when using GameObjectUtility.RemoveMonoBehavioursWithMissingScript
How to reproduce:
1. Open the attached “IN-98026.zip” project
2. Open the “SampleScene”
3. Enter Play Mode
4. Select the “TestRemoveScript” GameObject in the Hierarchy
5. Observe the Inspector Components
Expected result: The Script component with a missing reference is removed
Actual result: The Script component with a missing reference is still present
Reproducible with: 2022.3.60f1, 6000.0.45f1, 6000.1.0b13, 6000.2.0a8
Reproducible on: macOS Sequoia 15.3.2 (M3 Pro)
Notes:
- Reproducible on a new project
- Issue originally reported on Unity Discussions: https://discussions.unity.com/t/gameobjectutility-removemonobehaviourswithmissingscript-doesnt-work/1621226
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
- Unity Cloud icon does not appear next to project and does not connect correctly when the project is created with Cloud but closed right after creation
- ScrollerSlider in the Scroller Control is still using UXMLTraits
- Crash on ExtractHandles when shutting down the Editor in a specific scene while Burst jobs are in progress
- Unity Hub closes with no "Project is currently open" window when selecting an already open project from the Projects list
- The Hub freezes indefinitely when copy/pasting a lot of characters in the “Set project display name” Hub window since it has no character limit
Resolution Note:
After testing the issue and reviewing the custom code that was guessed to be causing the issue, it was incomplete and missing references and attachments on the correct GameObjects.
Original user reporting the issue on the Discussions thread did not mention the code used and also cannot reproduce the issue anymore. Without having the original project that the user was using, we can only assume that the issue is By Design and the problem was unfinished code or incorrect workflow.