Migrate Blueprint with C++ code attached

I did a C++ blueprint class for a character.
It works well and now I’ve tried to migrate the Character to a common project.

Apparently, the migration tool does not move the attached C++ code.

Is there a tutorial to move a C++ Blueprint to another project.

Thank you for your help.

Copy source files needed to suppprt that bluprint and (re)generate project file (right click uproject) and compile. But migration of source could be good feature request :slight_smile:

I’ve copied the Source folder.
Then right click on the uproject file and select the Generate Visual Studio Files.
It creates the .sln file. Open it and choose build.

Open the uproject file.
The Compile button, in Unreal Engine 4, on the toolbar isn’t there as in the other project.

Did I miss something to link the character with the C++ class ?

Thank you for your help.
Have a nice day,

Then use add code in file menu to create class which later you can delete, then for sure your project will be aware of code

Ok. I tried, but it is a little more complex.
When I do a Migrate, it was from a uproject called ThirdPersonCamera
The Migrate has been done in the project called Characters.
That means, when you generate the code, it use the Characters as a main source file for the cpp and h, and not the ThirdPersonCamera.
For the generated class, it is ok, you can use the same class name. Moving the files somewhere else and then replace the generated files.
You have to make few other changes to make it working.
It will be great if the system can take care of it, effectively.

Thanks again for your help,

I have a similar problem: I have a blueprint with a c++ base class, I tried to migrate it, but the code doesn’t get migrated, so I just created the exact same c++ class in the new project and copied the old c++ content over it, but the problem is that the blueprint class says it derives from an invalid class, so I don’t know how to reparent it to the new c++ class when I can’t even open it. Does regenerating the project solve this ? Or can I just replace the superclass reference with the new c++ class somehow?

I had similar troubles when I moved code from a plugin back into the core.

Because of that the “package path” or namespaces have changed and your Blueprint cannot find its superclass.
I think you need an ActiveClassRedirect entry for your C++ class in the DefaultEngine.ini in the config folder of your target project under [/Script/Engine.Engine].

the entry you need looks like this one:


The OldClassName equals just the name of your class, without any namespace.
The new ClassName contains the target namespace and ClassName.
You can determine the path by looking up the folder structure in your VS project.

after you have entered a correct redirect and your project starts, recompile and save. Then you can remove the ActiveClassRedirect from the config.

You copy and paste the file, and it doesn’t show up on your project.

any update about how to do this?