Exemplo n.º 1
0
    private void SetResponse(string jsonString)
    {
        LoginResponse loginResponse = LoginResponse.CreateFromJSON(jsonString);

        PlayerPrefs.SetString("token", loginResponse.token);
        PlayerPrefs.SetString("expiresIn", loginResponse.expiresIn.ToString());
        PlayerPrefs.SetString("username", loginResponse.username);
        PlayerPrefs.Save();
        if (onPlayerSettingsUpdated != null)
        {
            onPlayerSettingsUpdated.Invoke();
        }
    }