My game instance disappears after restarting the engine

I’ve only been using Visual Studio for two days. So it’s very likely that I’m doing something wrong.

The thing is that my game instance disappears when I restart the engine. And it doesn’t come back until I compile it.

What is the correct way to do it?

Thank you so much!!

I think the problem may be related to what this user comments.

I can’t see the subfolders either

I have migrated this project two times.
1-From version 4.27 to 5.0.3 version
2-From a Blueprint project to a C++ project on 5.0.3 version

So probably something went wrong in some migration process.

Does anyone know how to fix the modules?


I tried to do it with a new project and exactly the same thing happened.

MyGameInstance disappears from the Maps and Modes configuration and the C++ classes subfolders also disappear when the engine is restarted.

I have no idea why this happens or how to avoid it.
Engine version 5.0.3

Any help is appreciated

Ok, I don’t know exactly what happened but doing this fixed the problem.

1-First select the solution in Visual Studio and run the “clean” option.
2-Then run the “recompile” option.
3-Then run the shotrcut Ctrl+Alt+F11
4-Restart the engine

-Got this warning when restarting the engine
1

5-I selected “yes”

Now everything work fine.

Some of these steps may not be necessary, but that’s exactly what I did.

It would be great if someone could explain what the problem was.

Thank you so much!!


This video is not the solution to this problem, but I think it is very related, and I think it is extremely educational. Highly recommended for those like me who are migrating their projects from blueprint to C++.


1 Like

If I could elaborate on what I think happened. When you moved your project from blueprint to c++ it did not carry over the build.cs or target.cs files in the source folder which is necessary for your c++ folders to show in ue.
When you did the build, it probably created it so I think your way was sufficient.
As for the missing module warning, makes sense since it popped up because it was built with a different engine version, hope this helps.

1 Like

Yes, that’s right, I actually didn’t migrate the C# files. I only moved the files from the “Content” folder and the “.ini” files from the “Config” folder.
The next time I migrate a project I will take those files into consideration as well.
Thank you very much for your explanation. :heart:

1 Like