Persistence of Player Between Session (Steam)

Our multiplayer game is based on Steam.
Also 4.7.0 Unreal

So we have several players in the game session moving around. We want to store the player’s last position
so if the game exits and is re-run later, the player can join in the same place they were.

This requires some sort of persistent player ID. Obviously the SteamID of the player would work if I could get at it.
Most of the Steamworks interface is private so one can not just cast the ISessionInterface Steam version.

Is there a supported “Unreal Way” to do the following things…

  • Get a list of the players currently in the game. Not too difficult because I can Get By Class on the player blueprint.

  • Associate a player blueprint to their SteamID or similar ID when they rejoin a game?

Partial Answer?

I found that the various IDs a player, player controller, or player state has are not reliable.

So instead I did a C++ blueprint static function to get the Steam ID of the local player, and the gamertag too.

When a player joins a server I send a custom TDLPlayerJoin event with the player SteamID from the client to the server and just keep it as a string on the player blueprint. Works great.

Then when I want to store player data like inventory or Last Known Position, I can use the Steam ID as part of the file name.