Howto set GameInstance class in C++

It’s not in the GameMode. How do I set it and from what class should I set the GameInstance? Note that my GameMode & GameInstance classes are also C++ classes.

DefaultEngine.ini is used to configure the GameInstance class.

Add a section to the config like this:

[/Script/EngineSettings.GameMapsSettings]
GameInstanceClass=/Script/YourProjectModuleName.YourGameInstanceClass

Your project will most likely already have a GameMapsSettings section created so just append the line in that case.

You’ll find the config file inside YourProjectName/Config/DefaultEngine.ini

Hope this helps!

1 Like