I have player data that I want to pass to the server when the player joins a session. I was initially using OnPostLogin in GameMode, but there were issues with latency and I didn’t want to rely on a random delay, so figured I’d instead go with:
Client posses pawn-> Client gets their data from their GameInstance (which pulls said data at login screen from save file) → Client sends data to server → server adds data to list → server tells host to update their hud with player name (with short delay to ensure HUD is up).
The problem is that the data is always just the host data. I have tried both with/without replicating the data variable itself.
If someone could please point me in a good direction, I’d be most grateful.
Oh heck, I didn’t even know it only ran on server. That explains a lot, lol. I had initially thought of running OnBeginPlay but I was worried about not having enough time for the HUD and data to populate. I’ve been trying to avoid delays, but it’s rough to figure out.
I will give that a shot, thank you. I’ll let you know if it works.
Hey, I can get the information now (YAY!) by calling at the end of Begin Play, but on the server, my HUD update isn’t showing up. I’m running via LAN, 2 player Standalone, and the HUD definitely exists. It DOES populate with the server name, but it says the HUD invalid when the function is called by the client. Also the controller seems to be the client on both ends.