# My game instance disappears after restarting the engine

**URL:** <https://forums.unrealengine.com/t/my-game-instance-disappears-after-restarting-the-engine/736944>\
**Category:** Getting Started & Setup\
**Tags:** unreal-engine, editor, question, CPP\
**Created:** [December 27, 2022, 12:09pm UTC](https://forums.unrealengine.com/t/my-game-instance-disappears-after-restarting-the-engine/736944 "2022-12-27T12:09:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [December 27, 2022, 12:09pm UTC](https://forums.unrealengine.com/t/my-game-instance-disappears-after-restarting-the-engine/736944/1 "2022-12-27T12:09:14Z")

</div>

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.

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/8/fa8d25c5524d17c6675328b1113fa00e7c73657f.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/8/fa8d25c5524d17c6675328b1113fa00e7c73657f.mp4)

What is the correct way to do it?

Thank you so much!!

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [December 27, 2022, 2:11pm UTC](https://forums.unrealengine.com/t/my-game-instance-disappears-after-restarting-the-engine/736944/2 "2022-12-27T14:11:47Z")

</div>

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

> [@Why is UE4 Code Project not showing sub folders created within C++ Classes Folder even though they exist?](https://forums.unrealengine.com/t/why-is-ue4-code-project-not-showing-sub-folders-created-within-c-classes-folder-even-though-they-exist/459183/4):
>
> Problem is with the uproject file, it might be missing a module or the module is misconfigured for anyone else that comes across the problem “Modules”: []

I can’t see the subfolders either

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/2/dc2e96de47d47406e1a18d805bf90cc6588ae940.png)

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?

* * *

 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/0/3a0eb0e70d2647742609bd526b3dcee1621df9cf.png)

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [December 27, 2022, 4:25pm UTC](https://forums.unrealengine.com/t/my-game-instance-disappears-after-restarting-the-engine/736944/3 "2022-12-27T16:25:09Z")

</div>

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.

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/5/c/95c19452ee490a5f4b53b4a2821162fe1980c694.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/5/c/95c19452ee490a5f4b53b4a2821162fe1980c694.mp4)

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

Any help is appreciated

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [December 27, 2022, 6:35pm UTC](https://forums.unrealengine.com/t/my-game-instance-disappears-after-restarting-the-engine/736944/4 "2022-12-27T18:35:05Z")

</div>

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/f/4/6f4812ffbc55670043234f2b1168bd134bdf9e86.png)

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

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/8/f885e3bef29474c9a807c1105191a7b1a0bae0ec.jpeg "Unreal Engine C++ Project Setup, From Scratch") ](https://www.youtube.com/watch?v=94FvzO1HVzY)

* * *

---

<div class="post-metadata">

**Author:** ![HydroWin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HydroWin](https://forums.unrealengine.com/u/HydroWin)\
**Post date:** [December 28, 2022, 2:52am UTC](https://forums.unrealengine.com/t/my-game-instance-disappears-after-restarting-the-engine/736944/5 "2022-12-28T02:52:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [December 28, 2022, 8:36am UTC](https://forums.unrealengine.com/t/my-game-instance-disappears-after-restarting-the-engine/736944/6 "2022-12-28T08:36:13Z")

</div>

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