[SOLVED] Migrate/Move doesn't take care about references/paths! (Weird when coming from Unity.)

I’ve had one heck of a problem figuring out why the Advanced Vehicle Template couldn’t function from within a subfolder of another project.

Apparently, Unreal stores hard coded path values in its blueprints, which in this day and age sounds utterly bonkers (especially when coming here from Unity).

Here’s what happens if I move the Geometry/meshes folder INTO the VehicleAdv folder:

So confusing to a new user, as I did not delete anything, I just moved it, using the content browser in the Unreal Editor.

Why aren’t all references to that objects automatically updated on a move command?

(EDIT: Any why does the Advanced Vehicle template spread itself out in three different folders in my project root directory? The Geometry/meshes folder is utterly unecessary, and there’s actually a material in there as well, when there’s already a materials folder under VehiclesAdv. And why isn’t the VehiclesAdvBP folder names Blueprints and located within the VehicleAdv folder in the first place? So messy and apparently no easy way to clean up that mess!)

You’re only partially correct because you don’t know the most confusing part of the whole mess, so allow me to introduce you to our good old friend, the redirector. Let’s say you have a material called M_BaseMaterialForEverything. You want to move this material to another folder. It is referenced, not by a “hard coded path” but by a path relative to your project’s Content folder, and you have a gazillion assets referencing this material. What UE4 would have to do is load every single asset that references this material and update the reference to your new path.This could (and does) cause long wait times, out-of-memory crashes and a bunch of other fun stuff on bigger projects (Always remember that the reference point Epic uses for UE4 are 500GB+ projects with 50000+ assets in them). The questionable solution to this are redirectors. When you move something it doesn’t load all of those millions of assets to update the reference, but rather leaves behind an invisible redirector object that all those assets now point to and which points them to the real asset.

In your screenshot up above you’ll notice that the class of the referenced object is ObjectRedirector, which is what was left behind by the map you moved. In order to clean these up, you right-click on a folder in the content browser and hit “fix up redirectors”. This will then do what I said above - load all the assets and update the references, deleting the redirectors in the process. You can also turn on a content browser filter under Miscellaneous to show redirectors.

Regarding the messy folder hierarchy - this is true for every template and example project Epic releases unfortunately.

Oh, my god.

So that’s why I can never delete a folder from within the Unreal Editor? That’s another pretty big thing to leave out of the “Unity to Unreal” video lessons, if I didn’t miss it (the first thing you do in Unity is to move any download into an “assets” or “plugins” folder). :smiley:

Thank you so much for the information! That was eye opening, and such a quality of life saver. :slight_smile:

Just had a migration fail with broken references… didn’t seem to be due to redirectors though? I was migrating from a plugin content folder to a different plugin’s content folder in another project. Ended up temporarily bringing the other plugin into the same project, moving there and deleting the temp plugin after cleaning up redirectors, which finally worked.

Well, if you have changed relative paths to assets outside of the editor, asset references would be always broken.
“Plugin2/AssetX” is a different path than “Plugin1/AssetX”. Always move/rename files within the editor.

Migration between projects is only meant to copy assets with exactly the same paths as in the original project. It’s just a way to move a given asset folder with all dependencies automatically :slight_smile:

So within the editor, right-click “Migrate” won’t work if there’s a different content root path? So Project1/Plugins/X/Content -> Project2/Plugins/X/Content will work but Project1/Plugins/X/Content -> Project2/Plugins/Y/Content won’t? I wish that was made clearer