Migrate blueprint with C++ parent class

I’m migrating blueprint with C++ parent class X from Project1 to Project2 wich also has this class X.
In Editor in Project2 when I trying to edit blueprint I getting this message:

Blueprint could not be loaded because
it derives from an invalid class.
Check to make sure the parent class
for this blueprint hasn’t been
removed!

Hint in content manager says its parent class is None.

I exported blueprint from Project1 as T3D file and got the problem:

Blueprint nodes in textual representation referencing Project1 name like:

PinType=(PinCategory="byte",PinSubCategoryObject=Enum'/Script/Project1.ModuleTypeE')

So I suppose, that migrating process fails at this point.

I can’t fix this with find/replace in .uasset, because after doing that and opening Editor my hangs totally.

Could be useful to get T3D_to_uasset conversion tool.

Hey MorskoyZmey-

This is an issue we’ve seen before. The problem is that the blueprint is still seeing the class from Project1 as the parent (even if the class is migrated with the asset). This has been reported as UE-21307 for investigation however I’m not aware of any workaround other than copying the base class and recreating the blueprint.

Cheers

I see. As I said if there is (would be) a tool to convert T3D blueprint into uasset we can manually replace references.

Also I think there is another one workaround - to temporary rename Project2 to Project1, migrate blueprint and then rename back.

Hey, I’ve currently run into this problem and don’t have the time to go through on of my blueprints and fill in all the information again as it was a whole HUD class.

I was wondering if the fix someone put here would work as I can’t seem to get it to, and what method you used to rename your first project to the name of the second one?

Thanks

Edit: May have found the fix. I added

+ActiveGameNameRedirects=(OldGameName=“Project1”,NewGameName="/Script/Project2")
+ActiveGameNameRedirects=(OldGameName="/Script/Project1",NewGameName="/Script/Project2")

to the Default Engine ini and it seems to have sorted out the references.

1 Like

Ok, there is workaround

Here is my post (last one). It works!

See my answer

If your method works, then it’s sensational! Can’t wait to check

Hi all,

I’m using version 4.12.5 but I cant seem to migrate blueprints with c++ parents. I have already tried
+ActiveGameNameRedirects=(OldGameName=“Project1”,NewGameName=“/Script/Project2”) +ActiveGameNameRedirects=(OldGameName=“/Script/Project1”,NewGameName=“/Script/Project2”)

But it still say’s it cant find asset /Script/OLDNAME

Hey Aolobo-

I have not tried MorskoyZmey’s workaround, however I did notice that in his post he refers to “Class” where your snippet refer to “Game”. If you are using his method, it may be the difference in syntax that is an issue.

+ActiveClassRedirects=(OldClassName=“BaseCharacter”,NewClassName=“/Script/SandBox.BaseCharacter”)

oh sorry that was part of it but even when i use class, i still can’t open the blueprint =/ when i hover over it still says parent none

Do I have to do this before I import the blueprints, is there an order in which certain steps need to be done… I’ve followed multiple answers but I still can’t port my blueprints with c++ parents

Judging by the link provided by Pots4, it appears that this needs to go into the DefaultEngine.ini of the target project under the [/Script/Engine.Engine] heading. This would need to be done before attempting to migrate the blueprints over so that the redirects.

Again, this method is just a workaround. The related bug for this issue (UE-28639) is still unresolved and there is not yet a time frame of when a fix for this will be implemented.

Hi thank you very much for responding… So I created a fresh project and re-did everything. Used only this line to accomplish it. Not sure what happen to the previous project as it really did feel like i followed the exact steps. I’ll list down the steps in order so that it may help others in the future. Maybe the only difference was using a blueprint project instead of a C++ one… But I’m not too sure as I did it multiple times =D

[/Script/Engine.Engine]
+ActiveClassRedirects=(OldClassName=“BaseCharacter”,NewClassName=“/Script/NEWPROJECTNAME.BaseCharacter”)

  1. Create a new project. (I used a new blank blueprint project)

  2. Re-create the C++ class with the new project name

  3. Edit the defaultengine.ini file accordingly

  4. Compile and build and re-open project.

  5. There will be some load errors. Just enter those assets with load errors and reload the nodes(if available else just save) and save.

Should be fine then. Thanks again and Morskoy !!. OMG it’s 3AM, time to call it a day.

Hi @aolobo … I have the same problem … I can’t migrate my BP class with the parent class, I am getting the same message
I tried what you mentioned here, but it didn’t work, maybe I missed something, can you explain a bit more please what you did exactly.

After 4.16 the redirect syntax has changed, as LouDilbert says in the post linked to by MorskoyZmey.
This works in 4.22:

  • export your C++ classes to new project,

  • Add this to DefaultEngine.ini (found in VS under Config filter):

    [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")

  • Open editor, if you mouse over the blueprint you can see it is still parented to OldProject/{class path}

  • Save project once (Ctrl+S) - now it should be parented to NewProject/{class path}

1 Like

It’s work on 4.27 too!
save my time, thank you so much~

This works for 5.1 too, ty