"Can't find file for asset", but the asset is not being used at all
Every time I open the editor I got several "Can't find file for asset" errors (and I suspect these errors will also occur if I try to package the project).
These assets doesn't exist anymore, but the most important is: they are NOT referenced anymore. They are stucked in my blueprints like plagues.
There are a lot of posts of people with similar issues, and all of them manage to fix by recreating the assets and/or references... which I think is a bit ridiculous approach for a problem that appear to be very common. Is there a more smart way to fix this problem? Fixing up the redirectors didn't work. I don't think there is a magical button to remove this kind of inconsistent data (I wish), but maybe a script or C++ code?
(A more detailed explanation: I had some USoundBase properties in my classes. Since I am migrating to FMOD, I removed that properties from the classes. After that, I tryied to delete the old audio assets and the engine kept insisting that they are being referenced (which they definetely were NOT, unless we are talking about a ghost property here, which doesn't exist anymore but keeps referencing assets). I forced the deletion, expecting that at least Unreal would be smart enought to finally remove the reference, but unfortunetelly it didn't happen).
asked Mar 11 '19 at 08:32 PM in Using UE4
So, I was not trying to fix this issue on my project until today, and fortunately I was able to fix.
First, I create a new asset in the same folder and with the same name of the missing asset (SC_UI_Back). Then I opened each asset that was referencing this asset using the reference viewer. (Of course there are no real references, but since the engine insisted that the references exist, at least the reference viewer show these assets). Then I did any silly modification in the assets (I added a "Print String" node, just to immediately delete two seconds later) just to be able to click the "Compile" button and the "Save" button. After repeat the process in all assets that are "referencing" the SC_UI_Back, I was able to delete SC_UI_Back because now the engine magically doesn't think it is being referenced anymore.
answered Apr 25 '19 at 06:52 PM
We have to be really carefull and on the watch when MOVING, DELETING or RENAMING ASSETS. It´s a very good habit everytime we do one of these operations to do "FIX UP REDIRECTORS IN FOLDER".
Almost every asset can be referenced by another and the dependencies need to be fixed when deleting the "raw asset-file". When we delete an asset (i´m sure this happened a while ago here) there show up a dialogue which gives you the dependencies to other UnrealAssets. If we force delete and don´t do a fix up redirectors, it might happen that the other assets don´t know where to point for the wanted assets (which we deleted or moved).
After a while when we keep working and at some point strange things will happen and assets show up which we already deleted or assets occur at wrong places. When we work in a team and with VersionControl like Perforce or Tortoise this will become a real problem. This was my experience with Asset-operations.
The only thing which helped me and my team was to click Migrate on the Content-Folder and then Unreal will gather all dependencies and show you the assets which will be migrated. There showed up all assets which linked in some way to other, even if they don´t exist. Then you´re able to collect this names and you can create empty assets of the appr. type and name in the folder.
After this you can delete them, and fix the redirectors and the dependencies in other asset which reference to them.
A REAL PAIN ...
I heard of colleagues which needed to "Recreate" the whole project. Maybe this process can some day be automatized but maybe this is a technical problem.
answered Jul 05 '19 at 07:33 AM
You could try to Right click on the content folder and fix up redirectors in folder. Close the Project and delete the Saved and Intermediate folder. Also, make sure the referenced files are deleted in the explorer.
If that didn't solve the problem you might migrate the whole project in a new empty project. (Usually, this is what helps me to solve issues like this)
Hope that helps.
answered Mar 11 '19 at 11:19 PM
I have the exact same issue with FMOD and UE4 . Seems like your issue appears for UI sounds only, like mine, so this might be something to look at. Will reply if i find anything useful.
answered Mar 12 '19 at 09:11 PM
Seems like the solution for my issue was quite simple! I just had to right click on the UI widget blueprint asset in editor and click save. I did this for all UI widget blueprints and all references were fixed. Hope that helps.
answered Mar 13 '19 at 03:58 AM
I have been struggling with this issue for ages now. I know I have removed the asset. And I know it was used in the files that are having this issue. I deleted them anyway. But now there is no way to remove the hidden reference from the blueprint files. Anyways, UE4 has so many referencing issues that makes me lose my mind. I have to imagine this is a very common issue with people but there seems to be no publicly available fix for it. Recreating the blueprint IS NOT a fix.
answered Apr 25 '19 at 06:02 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here