Download

Clients Altering a GameInstance?

Is it possible for Clients to make changes to a GameInstance? I know that the GameInstance exists for all connected Clients, but if I want persistent data such as “Team Name” and “Team Colour” to transfer from a menu level to the actual game map, how do I go about it?

My first thought is to write a Server function that clients can call, to change a variable in the gameinstance. In the actual level, the gamestate will read those variables and set them accordingly, thus then going out to each player. Unless I replicate the GameInstance itself?

Team name and team colour attributes could probably get passed as an appended parameter when traveling to a new map and retrieved at the time of restartplayer or something like that. Take a look at the gamemode class and override the functions u need to add additional parameter assignments to the players. Your first thought sounds like a good one. Although dont think you need to replicate the gameinstance unless thats somethig people do normally i dont know. The game also has access to all the players and can pluck information right out of them.