We’ve found some behavior with AssetDatabase.GetDependencies and prefab variants that seems like a bug.
We’ve got a prefab with a behavior that has a member referencing another asset. There is a variant of that prefab which overrides that member to reference a different asset. If that member is deleted, then a call to AssetDatabase.GetDependencies will continue to return old referenced asset for the variant, but not the base.
The variant’s file will still refer to the old asset, which is great so the value comes back if we bring back that member. But since an instance won’t actually need that asset, it seems like a bug that it’s listed as a dependency. We use AssetDatabase.GetDependencies in our system that builds our asset bundles to group asset dependency chains into the same bundle. Since we’re getting stale data, our bundles are including assets that they shouldn’t.
We’ve entered a bug on that: https://fogbugz.unity3d.com/default.asp?1269085_3d558eqgqhfcmc4c
I’ll also note that before deleting the member, AssetDatabase.GetDependencies would return the asset that the base referenced as well as the asset it referenced with its override. This is understandable: Variant depends on Base, which depends on base’s references asset. But it seems like it would be Most Correct™ if the prefab variant’s reference overrides hid the parent’s references, because I don’t think you can reach them in any way from code or in the hierarchy if you only have an instance of the variant.