Test.cs 872 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Security.Policy;
  5. using Sfs2X;
  6. using Sfs2X.Util;
  7. using UnityEngine.UI;
  8. namespace AtlasUtility
  9. {
  10. using UnityEngine;
  11. public class Test : MonoBehaviour
  12. {
  13. public void Awake()
  14. {
  15. StartCoroutine(ETest());
  16. }
  17. public IEnumerator ETest()
  18. {
  19. Debug.Log("start");
  20. WWW www = new WWW("https://garden.dashgame.com/bundle/android/new_flower_tex1.3");
  21. while (www.isDone == false)
  22. {
  23. Debug.Log(www.progress);
  24. yield return null;
  25. }
  26. if (string.IsNullOrEmpty(www.error))
  27. {
  28. Debug.Log("finish");
  29. }
  30. else
  31. {
  32. Debug.Log(www.error);
  33. }
  34. }
  35. }
  36. }