Search Issue Tracker
Feature Request
Votes
0
Found in
2020.3.45f1
2021.3.19f1
2022.2.8f1
2023.1.0b5
2023.2.0a5
Issue ID
UUM-28635
Regression
No
AssetDatabase.GetDependencies returns a dependency that has been removed
Steps to reproduce:
1. Open the attached user's project "BugRepro_PhantomReferences.zip"
2. Right-click on any of the scriptable objects and use the custom method "List References" to see the list of references returned through
AssetDatabase.GetDependencies
3. See that the two scriptable object correctly reference each other (as well as their script)
4. Edit the scriptable script to remove the reference field named "referenceFieldtoDelete"
5. Use the "List reference" right-click option again to see that the reference is still being picked up.
Expected results: The reference is no longer found
Actual Results: The reference is kept as long as the scriptable doesn't get re-serialized.
Reproducible on: 2020.3.45f1, 2021.3.19f1, 2022.2.8f1, 2023.1.0b5, 2023.2.0a5
Notes:
-Another way to reproduce the same or similar issue is to do the same manipulation on the "TestComponent" that has been added to the "PrefabParent" and "PrefabChild". You'll see that, since the prefab child overrides the reference field value, the reference still gets picked up by "AssetDatabase.GetDependencies" as long as the prefab isn't reserialized.
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
- Terms of Service agreement checkbox is invisible under specific OS system themes (UI Accessibility)
- Tile Palette: "Create New Tilemap" dropdown area is displayed in several colors
- Input.mousePosition stops syncing to touch input when using "DownloadHandlerTexture" in WebGL build
- UI Builder canvas doesn't update element styling accordingly when changing Active Theme for some Editor Authoring elements
- Selector Value buttons are not aligned with parameters in UI Builder
Resolution Note:
Changing this behavior is breaking, but is scheduled to be addressed in a future Unity release.