public int playerHighScore = 0;
public void LoadHighScore()
{
SpatialBridge.userWorldDataStoreService.GetVariable("playerHighScore", 0).SetCompletedEvent((response) => {
//once the GetVariable request is completed this code will run.
playerHighScore = response.intValue;
Debug.Log("Player High Score: " + playerHighScore);
});
}
public void SaveHighScore()
{
SpatialBridge.userWorldDataStoreService.SetVariable("playerHighScore", playerHighScore);
}
public int playerHighScore = 0;
public void LoadHighScore()
{
SpatialBridge.userWorldDataStoreService.GetVariable("playerHighScore", 0).SetCompletedEvent((response) => {
//once the GetVariable request is completed this code will run.
playerHighScore = response.intValue;
Debug.Log("Player High Score: " + playerHighScore);
});
}
public void SaveHighScore()
{
SpatialBridge.userWorldDataStoreService.SetVariable("playerHighScore", playerHighScore);
}