# I am unable to make my C++ classes survive a restart in Unreal 5.6

**URL:** <https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 16, 2025, 5:47pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725 "2025-06-16T17:47:00Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![KatGaea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KatGaea](https://forums.unrealengine.com/u/KatGaea)\
**Post date:** [June 16, 2025, 5:47pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/1 "2025-06-16T17:47:00Z")

</div>

I am trying to follow [Set Up and Compile a C++ Project in Unreal Engine | Unreal Engine 5.6 Documentation | Epic Developer Community](https://dev.epicgames.com/documentation/en-us/unreal-engine/set-up-and-compile-a-cplusplus-project-in-unreal-engine) 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

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [June 16, 2025, 10:00pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/2 "2025-06-16T22:00:28Z")

</div>

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++.

---

<div class="post-metadata">

**Author:** ![KatGaea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KatGaea](https://forums.unrealengine.com/u/KatGaea)\
**Post date:** [June 16, 2025, 10:13pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/3 "2025-06-16T22:13:04Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![KatGaea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KatGaea](https://forums.unrealengine.com/u/KatGaea)\
**Post date:** [June 17, 2025, 12:15am UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/4 "2025-06-17T00:15:50Z")

</div>

I just tried this exact series of actions in Unreal 5.5.4, and it worked fine, Unreal 5.6? fails again

---

<div class="post-metadata">

**Author:** ![Kamougou](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kamougou](https://forums.unrealengine.com/u/Kamougou)\
**Post date:** [June 21, 2025, 1:11pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/5 "2025-06-21T13:11:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kamougou](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kamougou](https://forums.unrealengine.com/u/Kamougou)\
**Post date:** [June 22, 2025, 3:56pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/6 "2025-06-22T15:56:17Z")

</div>

It might be a bug with the template. Here is how i do to be able to follow the course:

1. Create a blank project based on c++ and call it AdventureGame
2. Add FirstPerson content to the project.

Everything should work properly after that.

---

<div class="post-metadata">

**Author:** ![user\_8957b75d53c59633abac973cca60e02588d2a4b050be698c7c1f2d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_8957b75d53c59633abac973cca60e02588d2a4b050be698c7c1f2d](https://forums.unrealengine.com/u/user_8957b75d53c59633abac973cca60e02588d2a4b050be698c7c1f2d)\
**Post date:** [June 22, 2025, 9:00pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/7 "2025-06-22T21:00:21Z")

</div>

Same issue here. All c++ classes broke in the project created with First Person blueprint template. And it works fine in blank project.

---

<div class="post-metadata">

**Author:** ![user\_8957b75d53c59633abac973cca60e02588d2a4b050be698c7c1f2d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_8957b75d53c59633abac973cca60e02588d2a4b050be698c7c1f2d](https://forums.unrealengine.com/u/user_8957b75d53c59633abac973cca60e02588d2a4b050be698c7c1f2d)\
**Post date:** [June 23, 2025, 8:07am UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/8 "2025-06-23T08:07:10Z")

</div>

I spent my whole day debugging it, and finally figured it out. Here is my solution:

1. Find “Config/DefaultEngine.ini” in your project folder, open it.
2. Search for “ActiveGameNameRedirects”. Hopefully you will find 4 lines:

```auto
+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")

```

1. Delete these two lines

```auto
+ActiveGameNameRedirects=(OldGameName="YourProjectName",NewGameName="/Script/MyProject")
+ActiveGameNameRedirects=(OldGameName="/Script/YourProjectName",NewGameName="/Script/MyProject")

```

and leave only

```auto
+ActiveGameNameRedirects=(OldGameName="TP_FirstPersonBP",NewGameName="/Script/YourProjectName")
+ActiveGameNameRedirects=(OldGameName="/Script/TP_FirstPersonBP",NewGameName="/Script/YourProjectName")

```

1. Reopen Unreal. Problem solved.

So this is a bug of template FirstPersonBP. Hope the official team fix it soon.

---

<div class="post-metadata">

**Author:** ![SundaryTV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SundaryTV](https://forums.unrealengine.com/u/SundaryTV)\
**Post date:** [June 23, 2025, 3:11pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/9 "2025-06-23T15:11:51Z")

</div>

> [@user\_8957b75d53c59633abac973cca60e02588d2a4b050be698c7c1f2d](#):
>
> I spent my whole day debugging it, and finally figured it out. Here is my solution:

Thanks !

I’m new to Unreal Engine and got the same issue.  
Spent 3 days tring to resolve this !

---

<div class="post-metadata">

**Author:** ![KatGaea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KatGaea](https://forums.unrealengine.com/u/KatGaea)\
**Post date:** [June 24, 2025, 9:56pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/10 "2025-06-24T21:56:19Z")

</div>

Thankyou!

---

<div class="post-metadata">

**Author:** ![Chimildic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chimildic](https://forums.unrealengine.com/u/Chimildic)\
**Post date:** [July 20, 2025, 8:44pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/11 "2025-07-20T20:44:01Z")

</div>

There was the same issue. Thanks!

---

<div class="post-metadata">

**Author:** ![bbans1121](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bbans1121](https://forums.unrealengine.com/u/bbans1121)\
**Post date:** [August 8, 2025, 2:31pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/12 "2025-08-08T14:31:56Z")

</div>

OMG Thank you!!  
I tried everyting, but this only works!

---

<div class="post-metadata">

**Author:** ![Gaukh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gaukh](https://forums.unrealengine.com/u/Gaukh)\
**Post date:** [August 12, 2025, 2:28pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/13 "2025-08-12T14:28:45Z")

</div>

Unfortunately I couldn’t solve it. Still happens and I used the TP\_Blank template and all I got in there is

```auto
[/Script/Engine.Engine]
+ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/MyGame")
+ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/MyGame")

```

---

<div class="post-metadata">

**Author:** ![bchan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bchan](https://forums.unrealengine.com/u/bchan)\
**Post date:** [August 14, 2025, 7:22pm UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/14 "2025-08-14T19:22:48Z")

</div>

Thanks! Works for me on Unreal 5.6

---

<div class="post-metadata">

**Author:** ![KatGaea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KatGaea](https://forums.unrealengine.com/u/KatGaea)\
**Post date:** [August 16, 2025, 11:34am UTC](https://forums.unrealengine.com/t/i-am-unable-to-make-my-c-classes-survive-a-restart-in-unreal-5-6/2560725/15 "2025-08-16T11:34:22Z")

</div>

Woo, it seems it got fixed in Unreal 5.6.1!  
UE-296511 And all!
