hi, I've problems downloading text files (with .htm extension) from url inside webplayer.
All works on standalone version
I've implemented WWWLoader script:
using System;
using System.Collections;
using UnityEngine;
public class WWWLoader:MonoBehaviour
{
private static WWWLoader s_Instance = null;
public static WWWLoader instance
{
get
{
if (s_Instance == null)
{
GameObject obj = new GameObject("_WWWLoader");
s_Instance = (WWWLoader)obj.AddComponent(typeof(WWWLoader));
}
return s_Instance;
}
}
public IEnumerator WaitForLoad(WWW www)
{
yield return www;
if (www.error != null)
{
Debug.Log("WWWLoader Error - \"" + www.url + "\" : "+ www.error);
} else {
Debug.Log("WWW completed!");
}
}
public static WWW Load(string url)
{
WWW www = new WWW(url);
instance.StartCoroutine(WWWLoader.instance.WaitForLoad(www));
return www;
}
}
i use this class in my script:
private string[] idCar=new string[]{"496","1800","1346"};
...
void Import (string raceId) {
int i=0;
while(i
but WWW won't download resources (standalone works)
projects is at
PROJECT
any help would be appreciated
bye
asked
Oct 02 '11 at 06:10 PM
trumanita
54
●
12
●
16
●
18