Multiple Gamemodes for game server.

Hi all,
Was wondering, if a game was be hosted and was using the gamemode.cpp and gamemode.h (that’s only stored on server) on the server and the .cpp is being used for default server gamemode. Could another gamemode be used in the world settings? If so, would it also be on the sever only (i ask for security) and could it be BluePrint (was going to use BluePrint Type and Edit Anywhere to expose it)?

Not sure and if anyone could help, thanks!

The Game Mode is instantiated only on the server; whether you’re using the default one, or a native / blueprint subclass. And of course, you can set any child class of Game Mode in the Wold Settings for a specific level.

Thank you, would that mean they both would be instantiated on the server and rest there? I would like to create a blueprint game, making api request with c++ gamemode on the server, but also have a blueprint gamemode for blueprint stuff that would be be secure. also on the server.

Not sure, if you have any thoughts or suggestions, many thanks!

There is always a single GameMode instance. If you inherit from your C++ GameMode with a BP class, and you set your resulting BP GameMode as the GameMode for the level / project, then latter will instantiated and be “the GameMode instance”. Its inheritance will work as it does for very other class (child inherits the parent’s methods and properties, etc).

I think I got it, ty so much! Your awesome wish you the best. Again thanks a ton!