Not all classes available for reparenting a blueprint

For some parent-less BP classes (Parent Class is “None”), lots of classes do not appear when I try to reparent them.

Basically I am attempting to migrate a c++ project by migrating all the assets to a blank c++ project. So far I have successfully transferred and compiled all the c++ classes (after making the appropriate project name changes). I have also migrated all the blueprints.

However, the blueprints that had c++ parents in my last project are now parent-less. I figured all I need to do is re-parent them to the c++ classes that are already compiled. However, they don’t show up in the re-parenting drop-down. In fact, many classes don’t appear. For example, I have a “Unit” class which is a child of APawn (which is a child of AActor). Blueprints that used to be a child of Unit cannot even be re-parented to Pawn or Actor, or any of their children. In fact, the only classes that show up are widget classes, and things like that.

How do I re-parent them to the class they’re supposed to be parented? In fact, how can I even re-parent them to Actor? (Something that seems like we should obviously be able to do.)

Can’t remember where, so I can’t provide a link, but I’m half sure i saw another question where the answer was that this problem has no solution, those blueprints are locked now.

One workaround I found is to re-parent all the BPs that you want to migrate to a more generic class that’s inherent in the editor (e.g. Pawn, Actor). Then migrate the asset, and then re-parent it back to its original c++ parent class. (This assumes you successfully transferred and compiled all your c++ code to the new project.) If you do this, I highly recommend you do it from a copy of the project from which you want to migrate, not the project itself. This will break a lot of stuff.

This is a very crude work-around. Depending on the Blueprint, it requires extensively going through that blueprint and fixing a lot of the errors that occur from the re-parenting, resetting defaults, etc. It’s quite a hassle, and it cost me a lot of time. I don’t think this “solution” is deserving of an acceptance tick. I await a more elegant solution. If there doesn’t exist one, then perhaps this should prompt a requested feature.

I had the same problem. While I don’t know the underlying cause of the missing class names, I was able to reparent using ini file class redirects as described here.

In DefaultEngine.ini put something like:

[/Script/Engine.Engine]
+ActiveClassRedirects=(OldClassName="/Script/OldModule.YourClassA",NewClassName="/Script/NewModule.YourClassA")
+ActiveClassRedirects=(OldClassName="/Script/OldModule.YourClassB",NewClassName="/Script/NewModule.YourClassB")

You may also need to do the same thing with struct redirects. The code responsible for redirecting your classes (and structs) is in FLinkerLoad.

5 Likes

It worked for me! Thanks a lot. In my case it was:
+ActiveClassRedirects=(OldClassName="/Script/RuntimeTransformer.ScaleGizmo",NewClassName="/Script/RotateObjects.ScaleGizmo")

RuntimeTransformer was a plugin and I moved the class into my main project called RotateObjects.

Also after you save the object from the editor, you can then remove the line from DefaultEngine.ini

1 Like

I managed to find a workaround, it is not pretty, but it worked for me. This might be suitable just for one/two classes not for many.

  1. Before changing the parent class in c++ - reparent your blueprint’s parent to AActor, save.
  2. Make your changes in c++ class, compile, run.
  3. Reparent your previously reparented class to your newly changed c++ class.

This worked for me. As I said It is not pretty but it worked for me. Might help someone. Have a good one.

What worked for me was relatively easy. I created a new blueprint class (that I just deleted later) that extends from that c++ class - this time it was visible in the new BP creation menu. It for some reason refreshed the editors list for reparenting as well, so I was able to see the c++ class in the reparent list. Then I just deleted the dummy BP i created.

2 Likes

You’re a genius, thank you!

1 Like