Download

How to set LobbyBeaconState?

Just a quick question on how to go about setting the LobbyBeaconState. On my LobbyBeaconHost class I’m setting the LobbyStateClass in the constructor and calling SetupLobbyState(x) in BeginPlay and this is working as intended as its setting the LobbyBeaconState up and using my custom class. On the client I cannot figure out how to set the LobbyBeaconState. I’ve tried several things. The most recent attempt was inside the OnClientConnected function in the LobbyBeaconHost class was to take the pointer to AOnlineBeaconClient, cast it to my LobbyBeaconClient class (cast successful), and set the LobbyState from there like MyCustomBeaconClient->LobbyState = MyCustomLobbyState. I’ve called the SetLobbyState function as well from the server with the same result. LobbyState is just a nullptr on the LobbyBeaconClient class. I cannot figure out how to set this up so I can replicate variables inside the LobbyState to connecting clients. Any suggestions would be helpful.