I’m trying to load players saved data into a variable when they spawn. I’m using InitPlayerRef for the player reference device so I can load the stats. This first code is getting called by playerspawnedevent. I’ve confirmed that InitPlayerRef.Register(Agent) is registering the agent. But the stat value is always 0.
Now if I subscribe to a trigger and call this function InitPlayerRefTest. I get the correct saved score printed back. Am I calling the first lines of code before the playerstats have been loaded in?