Noob question regarding GameInstance?

In the UE4 Multiplayer Blueprint video series, he sets up a new GameInstance BP called “GameInfoInstance” then in the Project settings sets the Game Instance from “GameInstance” to “GameInfoInstance.” Why did he create a new game instance and not just use the one that was there?

GameInstance is only base class, it’s a class inside engine code and you would need to edit engine code in order to change anything there, in order to add any code on your own and/or manipulate there default behavior you first need to make a class based from that class, either by C++ or Blueprint. After that you need to set that class in configuration to inform engine to use specific class or else they will create object just from base class bypassing all the code you made, sometimes is a class variable inside the other class, GameModeBase class have full set for them so you can set classes to specific gamemode, like for example different player pawn to spawn for game mode you made

The core base classes (not only GameInstace, but also GameMode and PlayerController etc.) have basic implementation of there function + skeleton (virtual functions which you can override and events) for addition features you can add to them. Most impertinently it provides interface (set of function and variables) that will work with the rest on engine code and your class will inherent. It’s kind of like a null implementation to make basic features of engine to work without you doing anything.

Btw it always good to look up the code of those base classes, as your class even if it’s gonna be blueprint will inherent this code and your additional code will need to cooperate with it. Here GameInstance:

https://github.com/EpicGames/UnrealEngine/blob/dbced2dd59f9f5dfef1d7786fd67ad2970adf95f/Engine/Source/Runtime/Engine/Private/GameInstance.cpp

Thank you.