I need to find a way to have my server store a unique string variable (PlayerIdentity) for every connected client. The way I have it currently set up is that upon entering credentials into a log-in screen, players are authenticated and their PlayerIdentity is stored in a string in the PlayerController blueprint. Also in the PlayerController blueprint I have a custom Run On Server event that retrieves this variable and records the player’s position vector to a database. This event / database access only runs on the server and should never be replicated or passed to clients.
This all works however the issue I am having is that when I log in and authenticate a second client, their PlayerIdentity variable seems to overwrite the first client and then the server only stores data for the most recent authentication. It seems like the server is only storing 1 PlayerIdentity variable rather than an array of PlayerIdentity variables based upon who is connected.
Any thoughts on how I might resolve this? I’m at my office at the moment so I can’t post a blueprint screenshot but I can definitely get one later tonight.
Is PlayerController the right place to be storing this unique per user variable? Should it be in GameInstance?