Tracking Down References to Missing Assets

I’m working to clean up a bunch of asset warnings in my current project. One of the most common issues comes from assets that reference other assets that don’t exist. This happens when deleting assets, committing an asset but not the things it references, pulling assets out of other projects, etc.

I made a tool to quickly find assets that refer to things that don’t exist. Cooking and Data Validation can also catch many cases where this happens. However, these tools only tell me that Asset A has a reference to Asset B somehow. It doesn’t tell me why/where it’s referencing it.

For example, here I can easily tell that the thing on the left references the thing on the right, and that the thing on the right doesn’t exist.

But when I look at the actual asset, everything looks perfectly normal. I can’t tell which property that missing asset is plugged into. In this case, I happen to know it’s this Prototype property
image

But there’s absolutely no indication when looking at it that it’s broken. And if I save the asset it will silently erase up that reference, permanently erasing any trace that there was supposed to be something plugged in there.

Unity on the other hand explicitly shows you when a reference is missing. It also logs the exact property path that contains the missing reference. This makes it easy to track down mistakes, and doesn’t risk data loss.

My question is: is it possible to find which property contains a reference to a missing asset? I want this broken links to be clearly visible in the Details panel, or at least able to be detected in code and logged. I’m open to any solution, built-in, plugin, or tips on how this can be detected in my own code.

2 Likes

Is there a section of the forum that would be a better place for this question?