Hello there,
My problem is simple : bundle loading through the WWW class return “unknown error.” on a webgl export
using UnityEngine;
using System.Collections;
public class LoadingWww : MonoBehaviour {
string content = "";
IEnumerator Start(){
content = "[LOADING INFO]";
WWW www = new WWW("http://www.website.com/path/to/bundles/text");
if (!www.isDone) yield return www;
if (www.error != null)
{
Debug.Log("Failure : " + www.error);
content += "
failure : “+www.error;
}
else
{
Debug.Log(“Success !”);
content += "
Success !”;
}
}
void OnGUI(){
GUI.Label(new Rect(0,0,Screen.width, Screen.height), content);
}
}
Here “text” in the url is a bundle filled with .txt files
Works fine in the editor. Just doesn’t work on a webgl export.
www.error log : “Unknown error.”
Any ideas ?
Thanks for the help !
==EDIT==
It seems that the issue is linked to the distant domain having a CORS properly set. ( Unity - Manual: WebGL Networking )
But I have no idea how to do that.