Migrate content between projects

From Epic Wiki
Jump to: navigation, search


If you have a Blueprint/Material/Etc. that you have built in one project, that you want to use in another project, you can use the "Migrate" function to do this easily. Migrating will copy all dependencies for that content to another project. This is completely different than the Export function.

How to Migrate (copy) content from one Project to another Project

Step 1: Locate the content

You will want to first locate the content in the content browser, depending on the quantity of items in your project you may need to use the search function.

Step 2: Right Click

Once you have found the content you want to migrate, use the Right Mouse Button to pull up the context menu. You will then want to select "Migrate...".
RMB Migrate.png

Step 3: Confirm Assets

Once you click on "Migrate..." the Asset Browser window will open. This will show all files that will be associated to the content you are attempting to migrate. Click on "OK".
Migrate Asset Report.png

Step 4: Locate Project to migrate to

This will then bring up a folder list. You will want to find the folder where your Unreal Engine projects are located, then find the Content folder for that project. Once you have found the content folder, click on "OK".

Default Location
Documents\Unreal Projects\(project name)\Content
Migrate Browse Folders.png



It will then show the progress of copying files, and then once it completes you can open your project and locate the migrated content.

IMPORTANT NOTES

Migrating from C++ Project to C++ Project

If you are migrating content from a C++ project to another C++ project, you will not have any custom items such as functions and variables that were compiled in the C++. For that you will need to use Visual Studio and copy/paste the corresponding C++ code from one project to the other, rename things, build the project binaries, and add core redirects to the project's DefaultEngine.ini.
As specified in this helpful post:

  • Copy/Rename
    • Copy the OldProjectName's source files to NewProjectName/Source/NewProjectName
    • Autoreplace in whole project OldProjectName to NewProjectName
    • Autoreplace in whole project OLDPROJECTNAME_API to NEWPROJECTNAME_API
    • Rename OldProjectName.Target.cs
    • Rename OldProjectNameEditor.Target.cs
    • Rename OldProjectName.Build.cs
    • Rename OldProjectName.[cpp,h]
  • Add Core Redirects in NewProjectName/Config/DefaultEngine.ini (this is so the migrated content that uses C++ classes can find the new project's classes):
[CoreRedirects]
+ClassRedirects=(MatchSubstring=True,OldName="/OldProjectName",NewName="/NewProjectName")
+EnumRedirects=(MatchSubstring=True,OldName="/OldProjectName",NewName="/NewProjectName")
+FunctionRedirects=(MatchSubstring=True,OldName="/OldProjectName",NewName="/NewProjectName")
+StructRedirects=(MatchSubstring=True,OldName="/OldProjectName",NewName="/NewProjectName")

Finally, after the newly migrated assets and maps are opened in the new project, there may be errors/warnings for the copied C++ classes. A resave of those assets will clear those errors.


Migrating from C++ Project to Blueprint Project

If you are migrating content from a C++ project to another Blueprint project, you will not have any custom items such as functions and variables that were compiled in the C++. You will need to create new Blueprint functions to mimic those created in C++.