Is it possible to have WWW not freeze up the entire Unity app, i.e., have the download happen “in the background”, while a gameobject animation is being carried through?
Put it in a coroutine. Here is a segment from my VersionCheck script.
public IEnumerator CheckVersion()
{
Busy.SetActive(true);
yield return 1;
if (Application.internetReachability == NetworkReachability.NotReachable)
{
DoFail(string.Format(ErrorMessage, "Internet not reachable"));
yield break;
}
var www = new WWW(ApiUrl);
yield return new WaitForSeconds(1);
yield return www;
yield return 1;
var v = www.text.Replace("\"", "");
if (!string.IsNullOrEmpty(www.error))
{
DoFail(string.Format(ErrorMessage, www.error));
}
else if (Version != v)
{
DoFail(string.Format(FailMessage, v));
}
else
{
Close();
}
}
I asked a very similar question, and it’s all working now.