private void SavePlayer() { // Get the json string of the object. string jsonPlayer = JsonUtility.ToJson(_playerData); 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. Drive.CreateObject(jsonPlayer, _tableName, true); }
private IEnumerator ProcessQueue() { _processing = true; while (_logMsgQueue.Count > 0) { string jsonLog = JsonUtility.ToJson(_logMsgQueue[0]); Drive.CreateObject(jsonLog, TABLE_NAME); _logMsgQueue.RemoveAt(0); yield return(new WaitForSeconds(_interval)); } _processing = false; }