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
- The UI is not visible when resizing out of focus built Player window with Application.runInBackground set to false
- [Linux] "Error while reading movie" errors are thrown when opening templates
- Standalone profiler process is hidden in macOS dock
- Shader warnings are being thrown after building Mixed Reality Template
- Error is thrown when entering play mode with build profiles docked and standalone profiler open
Resolution Note:
Changing this behavior is breaking, but is scheduled to be addressed in a future Unity release.