I’ve set up a host/join game MP system a lot like the one used in the Multiplayer Shootout project. Because of the way the Game Instance and State Enum classes work, all non-host clients’ screens will go blank whenever a game is hosted. I assume that this is because each client is using the same Game Instance.
Is there a way to assign a different Game Instance to each player?
If that’s the case, then my problem isn’t making any sense.
I’m calling a function from the GameInstance BP that removes the Main Menu UI from the viewport, starts a new MP session, and opens a new level. Whenever I do this on a listen server, the main menus on all the clients’ windows are removed as well.
Hey do you got a solution for your problem? I basicly have the same issue. Two clients use the same GameInstance. If i remove a certain menu it removes it for all clients on that machine. (The function is not replicated). I also try to set the player info for the game in the lobby that set it in the game instance (the players start position or the players color for example) to grab that information at the start of the game, but it always gets overwritten because both players use the same game instance. (I use the standalone, 2 player version) Is there no way to spawn a gameinstance for every player?
Hey do you got a solution for your problem? I basicly have the same issue. Two clients use the same GameInstance. If i remove a certain menu it removes it for all clients on that machine. (The function is not replicated). I also try to set the player info for the game in the lobby that set it in the game instance (the players start position or the players color for example) to grab that information at the start of the game, but it always gets overwritten because both players use the same game instance. (I use the standalone, 2 player version) Is there no way to spawn a gameinstance for every player?
This is super late. But I think what you want is the ULocalPlayerSubsystem as opposed to the UGameInstanceSubsystem. Please correct me if I am wrong, as I have never used the local player subsystem, however, I believe this is a subsystem that is unique per player and has the lifetime of each local player.