Well, through pure trial and error, I have something that works. I don’t know if what I’m doing is safe.
Let me simplify the class names so that my examples are easier to read. Suppose you had these classes, with the arrow pointing from derived to base:
AActor ← AA ← AB ← AC ← AD ← AE
And you wanted to change your hierarchy to this:
AActor ← AA ← AB ← ATheNewActor ← AC ← AD ← AE
This is working for me, so far, with no complaints from UE:
- In the editor, create the new class “ATheNewActor,” derived from AB.
- Close the editor so that it isn’t running while you do the rest of this.
- Open AC.h and change it’s parent, i.e.:
class MY_GAME_API AC : public ATheNewActor
- Open the generated code for class AC (presumably “AC.generated.h”).
- Replace all occurrences of “AB” with “ATheNewActor.” I only see two places as of UE 4.7.
- Build and run the editor and it should now recognize class ATheNewActor as the parent of AC.