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
- Crash on __pthread_kill when entering Play mode
- Crash on tlsf_free when exiting Play Mode in a specific project
- Camera Solid Color is overwritten when injecting Custom Render Pass at 'RenderPassEvent.AfterRenderingPrePasses + 1'
- Shadows are not rendering when using the "On Demand" shadow update mode with GPU Resident Drawer and additional camera render texture
- "AVFoundationVideoMedia error while reading” error is thrown when streaming from a URL with a signed token in VideoPlayer
Resolution Note:
Changing this behavior is breaking, but is scheduled to be addressed in a future Unity release.