# C++ classes are disappearing in editor, but they are appearing in Visual Studio?!

**URL:** <https://forums.unrealengine.com/t/c-classes-are-disappearing-in-editor-but-they-are-appearing-in-visual-studio/783711>\
**Category:** C++\
**Tags:** unreal-engine, editor, Visual-Studio, CPP, question, Blueprint\
**Created:** [March 4, 2023, 4:35pm UTC](https://forums.unrealengine.com/t/c-classes-are-disappearing-in-editor-but-they-are-appearing-in-visual-studio/783711 "2023-03-04T16:35:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wednescast\_arts](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wednescast_arts/32/1047686_2.png) [@wednescast\_arts](https://forums.unrealengine.com/u/wednescast_arts)\
**Post date:** [March 4, 2023, 4:35pm UTC](https://forums.unrealengine.com/t/c-classes-are-disappearing-in-editor-but-they-are-appearing-in-visual-studio/783711/1 "2023-03-04T16:35:42Z")

</div>

Hello.  
I have a strange and absurd phenomenon on UE5.

I created C++ class in Unreal Editor, then I edited it in Visual Studio. As far as I planned to try to make animated UMG thing on C++, I reparented User Widget Blueprint to my C++ class. And after my several tests, Unreal Editor crashed. But IDE was opened. And I restarted UE5 (with automatically sending a report) And then… The biggest programming absurdity I have ever encountered.

So let me show you some screenshots of my problem. Just look at the screenshot from Visual Studio.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/0/4/4049d227aa728397983b6c468955ff8f8ae63c28.png)

Full version of this screenshot:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/e/9ae9f8a28c531bc99b6ee81fbb5015bf1287f277.png)

And let’s have a look at the situation from Unreal Editor.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/a/d/8ad7d298ceec663e802fd7d0080773aae22aa9ba.png)

Full version of this screenshot:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/3/bc30d0f453cd98111f7fd9c1376a654d4999ecbf.jpeg)

After restarting the project and trying to open User Widget Blueprint, I get such error message:

> Widget 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!

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/4/e34b78ba80c91a687726a3888eb0ecf43efadcab.jpeg)

It’s strange, isn’t it?

Then, note: I’m using Unreal Engine 5.1.1 from Epic Games Launcher and Visual Studio 2022 Community Edition.  
And yeah, I know that there are many similar topics and questions on Unreal Engine Forums. But even refreshing VS solution didn’t help me in this problem. 😕

Should you know how to solve that strange and absurd problem, please don’t hesitate to leave your solution or comments about that.

I hope that problem is soluble and this bug could be fixed on next versions of UE5.

---

<div class="post-metadata">

**Author:** ![TuppsMidel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TuppsMidel](https://forums.unrealengine.com/u/TuppsMidel)\
**Post date:** [March 6, 2023, 7:28pm UTC](https://forums.unrealengine.com/t/c-classes-are-disappearing-in-editor-but-they-are-appearing-in-visual-studio/783711/2 "2023-03-06T19:28:50Z")

</div>

I had the same issue. Solution from here worked for me.

> [@My C++ classes disappear after reopening the project. Why?](https://forums.unrealengine.com/t/my-c-classes-disappear-after-reopening-the-project-why/535990):
>
> I have created the actor MyEarth which loads a staticmesh from Content Directory and the class MyGameModeBase (derived from GameModeBase) which spawns an instance of MyEarth in a position. Everything works fine, the actor appears as expected. But,after saving eveything,when i reopen the project, my c++ classes MyEarth and MyGameModeBase are no longer in the C++Classes Folder of the Content Drawer of the Editor,and when i run the project,nothing appears and no MyEarth actor in the Outliner. Obv…

---

<div class="post-metadata">

**Author:** ![wednescast\_arts](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wednescast_arts/32/1047686_2.png) [@wednescast\_arts](https://forums.unrealengine.com/u/wednescast_arts)\
**Post date:** [March 6, 2023, 8:42pm UTC](https://forums.unrealengine.com/t/c-classes-are-disappearing-in-editor-but-they-are-appearing-in-visual-studio/783711/3 "2023-03-06T20:42:14Z")

</div>

Well, I deleted Intermediate and Binaries folders. I got warning.

![Zrzut ekranu 2023-03-06 213657](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/f/0df4ecc7c540687210201a677f657f7702132abe.png)

Then, I got that error 🙂

![Zrzut ekranu 2023-03-06 213813](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/a/c0a12d52467a80888e890a349feb0a91f3ec1f59.png)

But then, Unreal Engine was launched successfully, and I finally have access to my C++ classes))

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/0/f80d3d69695f92856591481b8a0c1a6e11e26160.png)

Thank you very much \<3

I hope that bug will be fixed on UE 5.1.x or 5.2

---

<div class="post-metadata">

**Author:** ![PresumptivePanda](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/presumptivepanda/32/1194593_2.png) [@PresumptivePanda](https://forums.unrealengine.com/u/PresumptivePanda)\
**Post date:** [March 10, 2023, 4:54am UTC](https://forums.unrealengine.com/t/c-classes-are-disappearing-in-editor-but-they-are-appearing-in-visual-studio/783711/4 "2023-03-10T04:54:34Z")

</div>

Hi there @wednescast_arts, hope you’re well!

This topic has been moved from **International** to **Programming & Scripting: C++**.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! 🙂
