I am trying to follow Set Up and Compile a C++ Project in Unreal Engine | Unreal Engine 5.6 Documentation | Epic Developer Community in Unreal 5.6 However when I parent a blueprint off of a C++ class, save, compile and exit unreal, when I restart it, The blueprint not only is no longer parenteded,giving me the error 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! Do you want to continue (it can crash the editor)
If I try to reparent it it won’t work. I have tried this on MacOS 26 and on a fresh install of 5.6 on Windows 11 with the same error so I am unsure what is happening here
Can you try changing the name of the class and recompiling your C++ project? Make sure it’s something unique just to test it out. Sometimes if you use a class name that already exists in the codebase, UE can do very strange things. It’s happened to me several times. If that’s what it is, then you can try and pick a new name that still suits your project.
Also, make sure that you did a build in Visual Studio BEFORE parenting. Don’t parent a class that was added and compiled while the editor is open. That will only last for the session because live compile substitutes class names until you do a rebuild in Visual Studio. This is an especially common problem with new variables in C++.
Ok, I have made a new project named LearningGame, Made a C++ class called KatGameMode, refreshed project, then opened it. then closed UnrealEditor and built the project in IDE, started Unreal, made the blueprint. BP_KatGameMode. Saved it, then exited and started again. As soon as I try to load BP_KatGameMode I get the error again - 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! Do you want to continue (it can crash the editor)?
I just tried this exact series of actions in Unreal 5.5.4, and it worked fine, Unreal 5.6? fails again
I have the same problem. To start with the game mode icon do not appear on the class. You just get C++ class. And it look like unreal do not recognize it as so. I wonder if i need to add something to build public dependency… Same as you it work fine on 5.5.
It might be a bug with the template. Here is how i do to be able to follow the course:
- Create a blank project based on c++ and call it AdventureGame
- Add FirstPerson content to the project.
Everything should work properly after that.
Same issue here. All c++ classes broke in the project created with First Person blueprint template. And it works fine in blank project.
I spent my whole day debugging it, and finally figured it out. Here is my solution:
- Find “Config/DefaultEngine.ini” in your project folder, open it.
- Search for “ActiveGameNameRedirects”. Hopefully you will find 4 lines:
+ActiveGameNameRedirects=(OldGameName="TP_FirstPersonBP",NewGameName="/Script/YourProjectName")
+ActiveGameNameRedirects=(OldGameName="/Script/TP_FirstPersonBP",NewGameName="/Script/YourProjectName")
+ActiveGameNameRedirects=(OldGameName="YourProjectName",NewGameName="/Script/MyProject")
+ActiveGameNameRedirects=(OldGameName="/Script/YourProjectName",NewGameName="/Script/MyProject")
- Delete these two lines
+ActiveGameNameRedirects=(OldGameName="YourProjectName",NewGameName="/Script/MyProject")
+ActiveGameNameRedirects=(OldGameName="/Script/YourProjectName",NewGameName="/Script/MyProject")
and leave only
+ActiveGameNameRedirects=(OldGameName="TP_FirstPersonBP",NewGameName="/Script/YourProjectName")
+ActiveGameNameRedirects=(OldGameName="/Script/TP_FirstPersonBP",NewGameName="/Script/YourProjectName")
- Reopen Unreal. Problem solved.
So this is a bug of template FirstPersonBP. Hope the official team fix it soon.
Thanks !
I’m new to Unreal Engine and got the same issue.
Spent 3 days tring to resolve this !
Thankyou!