/// <summary> /// /// </summary> /// <param name="player"></param> /// <param name="ScoreToAdd"></param> public static void PostScore(this PhotonPlayer player, int ScoreToAdd = 0) { int current = player.GetPlayerScore(); current = current + ScoreToAdd; Hashtable score = new Hashtable(); // using PUN's implementation of Hashtable score[PropertiesKeys.ScoreKey] = current; player.SetCustomProperties(score); // this locally sets the score and will sync it in-game asap. }