I'm trying to convert my project to webgl and I getting a cloud.error = Unknown error every time i try to load in data from my cloud server.
It works fine in the editor but when i make a build and host it on itch.io or run it locally through a edge browser the error occurs.
being an "unknown error" doesn't help too.
Am i doing something wrong? i'm pulling my hair out trying to figure this out
Code: Select all
public IEnumerator DownloadProfiles()
{
Debug.Log("Downloading profiles");
file = new ES3File(SchoolName + "UsersList.es3", false);
ES3Cloud cloud = new ES3Cloud(url, apiKey);
yield return cloud.DownloadFile(file);
if (cloud.isError)
{
Debug.LogError(cloud.error);
LoadError.gameObject.SetActive(true);
LoadError.text = cloud.error;
CantFindProfiles.SetActive(true);
SelectAccountUI.SetActive(false);
AccountNameUI.SetActive(true);
}
else
{
if (file.KeyExists(SchoolName + "Users"))
{
Debug.Log("found and Downloaded profiles");
LoadingProfilesText.SetActive(false);
Profiles = file.Load<List<SprayPainterProfilesList>>(SchoolName + "Users");
dropdown.gameObject.SetActive(true);
foreach (SprayPainterProfilesList p in Profiles)
{
Debug.Log("adding profiles to dropdown");
dropdown.options.Add(new TMP_Dropdown.OptionData() { text = p.ProfileUsername });
}
}
}
}