public IEnumerator SyncPlayerInfo()
    {
        LocalDBController.DeleteAll <PlayerInfo>();
        LocalDBController.InsertOrReplace(_playerInfo);

        if (_playerInfo.PlayerID == null)
        {
            yield return(RegisterPlayer());
        }
        if (_playerInfo.PlayerID != null)
        {
            yield return(ServerController.Post <string>(
                             $@"PlayerInfo/Update?id={GetPlayerID}",
                             _playerInfo,
                             // On Successfully connect to the account
                             respnse =>
            {
                if (respnse == "Success")
                {
                    _playerInfo.Dirty = false;
                    LocalDBController.DeleteAll <PlayerInfo>();
                    LocalDBController.InsertOrReplace(_playerInfo);
                }
            }));

            string pusheId = FindObjectsOfType <Pushe>()[0].Pid;

            if (pusheId == "")
            {
                Debug.Log("no push id");
            }
            else
            {
                yield return(ServerControllerBase.Post <string>(
                                 $@"PushIDs/Update?playerID={_playerInfo.PlayerID}",
                                 pusheId,
                                 Debug.Log
                                 ));
            }
        }
    }
    private IEnumerator RegisterPlayer()
    {
        _playerInfo.PlayerID = -1;
        Debug.Log(_playerInfo.PlayerID);
        Debug.Log(_playerInfo);
        // Register player to server and get PlayerID
        yield return(Post <PlayerInfo>(
                         @"PlayerInfo/Create",
                         _playerInfo,
                         r => { _playerInfo = r; }, request =>
        {
            Debug.Log(request.error);
        }));

        if (_playerInfo.PlayerID == -1)
        {
            Debug.Log("player not registered");

            _playerInfo.PlayerID = null;
        }
        else
        {
            OnNewPlayerID();
            Debug.Log("player registered with id : " + _playerInfo.PlayerID);

            string pusheId = PlayerPrefs.GetString("PID", "");

            if (pusheId == "")
            {
                yield break;
            }

            yield return(ServerControllerBase.Post <string>(
                             $@"PushIDs/Update?playerID={_playerInfo.PlayerID}",
                             pusheId,
                             Debug.Log
                             ));
        }
    }