public static void namechange(string n) { Debug.Log("<color=yellow>Updating Player name.</color>"); bool runtime = true; player = new PlayerInfo(); playername = n; player.name = playername; player.q11 = 0; player.q12 = 0; player.q13 = 0; player.q21 = 0; player.q22 = 0; player.q23 = 0; player.q31 = 0; player.q32 = 0; player.q33 = 0; player.q41 = 0; player.q42 = 0; player.q43 = 0; string jsonPlayer = JsonUtility.ToJson(player); Debug.Log("<color=yellow>Sending following player to the cloud: \n</color>" + jsonPlayer); //string jsonPlayer = JsonUtility.ToJson(player); // Save the object on the cloud, in a table called like the object type. CloudConnectorCore.CreateObject(jsonPlayer, tableName, runtime); }
// Persist the example object in the cloud. public static void SaveGandalf(bool runtime) { // Get the json string of the object. string jsonPlayer = JsonUtility.ToJson(player); Debug.Log("<color=yellow>Sending following player to the cloud: \n</color>" + jsonPlayer); // Save the object on the cloud, in a table called like the object type. CloudConnectorCore.CreateObject(jsonPlayer, tableName, runtime); }
public static void SavePlayer(PlayerInfo _player) { string jsonPlayer = JsonUtility.ToJson(_player); CloudConnectorCore.CreateObject(jsonPlayer, PLAYER, true); }