I have several actors that have variables that are manipulated by GameMode. The actor and variables are replicated.
Is this the proper way of doing this or should I keep a working version of these variables inside Gamemode and just updated the variables in the actors for reference?
the reason why replication is pretty restrictive is because of all the security. You need to try hard to do something unsafe, since the server decides which data to accept from the clients. So a client can not manipulate the server at all but only itself. And you actually have no leeway to mess things up in Blueprints anyway
The only thing you want to avoid is letting the server send secret gameplay data to everyone. So e.g. in a card-game you don’t want the server to send playercards to everyone except the owning player. Even if you ignore the data it still sticks around in memory. But even this really only matters if it is worth to hack your game to read this data.
So it depends on your game if you need to worry about security at all.
So to answer your question: No matter where you stick your variables on the server, the clients will not be able to change them if not supposed to do so. The client can change pretty everything but this only matters the client
Thank you! Perfect answer. I am just focusing more on keeping the important variables in gamemode and never replicate them or share them anywhere. The cost of doing this is more expensive but it makes for a more secure fair game.