Page 1 of 1

Cloud save not working on Android

Posted: Mon May 02, 2022 7:52 pm
by Cunibon
I'm working on some silly project and wanted to try out the cloud saving capabilities of ES3.
It works great on WebGl and in the unity editor but seems to do nothing on android 12.
I have this code:

Code: Select all

    void Start()
    {
        StartCoroutine(StartEnum());
    }

    public IEnumerator StartEnum()
    {
        yield return StartCoroutine(LoadEnum());

        if(ES3.KeyExists("LastLogin","local.es3"))
        {
            SimpData lastLogin = ES3.Load<SimpData>("LastLogin", "local.es3");

            Name.text = lastLogin.SimpName;
            Password.text = lastLogin.SimpCode;
        }
    }

    public IEnumerator LoadEnum()
    {
        yield return StartCoroutine(Sync());

        if (ES3.KeyExists("simpDatas"))
            PersistantData.simpDatas = ES3.Load<List<SimpData>>("simpDatas");
        else
        {
            PersistantData.simpDatas = new List<SimpData>();

            SimpData simpData = new SimpData();

            simpData.SimpName = "Admin";
            simpData.SimpCode = "Admin";
            PersistantData.simpDatas.Add(simpData);
        }
    }

    public IEnumerator Sync()
    {
        var cloud = new ES3Cloud("MyServer", "MyAPIKey");

        yield return StartCoroutine(cloud.Sync("simpDatas.es3"));

        if (cloud.isError)
            Debug.LogError(cloud.error);
    }
I tried searching with logcat but there is just nothing. No error or mention of any of this.
It always defaults to my Admin account and nothing else.

Re: Cloud save not working on Android

Posted: Tue May 03, 2022 9:51 am
by Joel
Hi there, and thanks for getting in contact.

We've had no reports of ES3Cloud failing on Android and it appears to be working fine at our end. Please could you create a new project with a simple scene which replicates the issue and private message it to me with instructions?

All the best,
Joel