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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
Changing this behavior is breaking, but is scheduled to be addressed in a future Unity release.