GameInstance and GameMode in Multiplayer Games

Hi mcleary

I am glad you found my explanation useful. If it answered your original question, could you mark it as the answer to help other people find it. That would be great :slight_smile:

The GameMode is not accessible to the clients as it’s the main class responsible for handling player connections to the server and the player controllers’ registration process (OnPostLogin). Once the player controller is registered on the server, it sends this controller to the client and overnights the local controller. This is why the GameMode only exists on the server, because it may try to assign the player controller twice (server and client) which will throw everything out of whack.

Altering this class data on the client could cause heavy internal confusion and is not the way the GameMode is intended to be used.

The GameInstance CAN be used in the client, however, it is best practice not to, unless there are extra control parameters required for the game behavior on the clients (providing it will not affect any of the run time data being handled by the server).

As mentioned, this is why classes such as the player state and the game state are implemented.

Is there anything specific you are looking at achieving?

Thanks

Alex