Asset failed import, yet cannot delete the reference to it

I’ve had this issue happen twice now, in two separate projects, on both 4.7.6 and 4.8.0 (both github). This issue is involved with renaming and/or deleting assets.

Stay with me on this one, it’s somewhat difficult to explain.

I’ve been using the level streaming feature to help keep my maps organized, migrating actors into various maps and toggling their visibility when I don’t need to see them. In this instance, I copied some assets into a streaming level, choosing not to delete the originals. This would leave me with two identical maps, based on the assets I copied, the intended functionality.

What happened next is a bit of a blur, as I was working pretty quickly, and hit the errors before I realized what had happened. But I believe what I did was attempt to rename this new streaming map before saving it. I assumed that renaming the map would cause the editor to apply the name change to all of the associated references, and I would save afterwards.

Instead what happened is that, while the map was successfully renamed in the Content Browser, and I could add the new existing map as a streaming level, my persistent level did not rename or remove the reference in question. Therefore, upon loading my persistent level, I’m greeted with “Failed import for…” warnings, as the level is looking for a streaming map who’s name does not exist in my Content directory. Worse still, I am unable to remove the reference to the old map through the Levels window.

You’ll notice that the option to remove the map has been greyed out, obviously because the map had a loading error.

I suppose my question becomes this: If the map which fails to import no longer exists in the Content directory, how can you remove the reference from the persistent level?

I suppose the workaround for this would have been to remove the reference to the streaming level before renaming it, and saving prior to doing so likely would have helped.

While I was writing this post I figure I could probably just create a new, empty map in that directory that uses the old name. Then the editor should find and load it with no errors, and I can just remove the reference then. Guess I’ll give that a shot.

Either way, anyone able to shed some light on this?

1 Like

Hi ,

I’ve had alot of similiar errors. Try using “Fixup Redirectors in Folders” for each of your content browser folders.

I actually recommend that anytime you do an asset move, follow up with the “Fixup Redirectors” step afterwards. In some cases, I found, Move asset, shutdown editor, open editor, “fixup redirectors” is my preferred steps.

It seems that even when you move an asset, there is a ghost entity left behined, “the redirectors” which still exist. They are supposed to clean themselves up on editor restart, but sometimes they dont.

Hope that helps!

Hey Devero,

I’ve always wondered about these redirectors, as I noticed a long time ago that they actually exist through the Windows Explorer, where you’ll see the old deleted or moved uasset, but it’s an empty file 1k in size that does not appear in the Content Browser.

I never did know about the “Fixup Redirectors in Folders” option, but that’s amazing, and it does seem to help clean up those files. However, it didn’t help for my issue.

What did work for me, though, was removing the redirector from source control (perforce). Once I deleted the redirector through Perforce, the persistent level would still throw the error, but now the Levels window showed the map name in red, and appended “[Missing Level]” to the name. I was then able to successfully remove the streaming map and the import errors have disappeared.

Thanks for the insight!

Could you tell us how/where is “the redirector” file named in your source control, I’m also using perforce.

Assuming you’ve changed the name of an asset (creating a redirector) and then submitted to Perforce, the redirector will have been added to the changelist just like any other asset (I’m pretty sure you don’t see it in the change log before you submit, either). You’ll find it in the content area of your workspace, in the same directory as the original asset. It should stick out like a sore thumb, as it’ll still be using the old name and be 1k in size.

Mark that redirector for delete in perforce, and submit the changelist to have it removed.

You’ll still need to utilize the “Fix up redirectors” command in the editor before doing any of this.