예제 #1
0
        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);
        }
예제 #2
0
        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;
        }