Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. StartCoroutine (LoadAsset(i, asseturl[i],assetbundles[i]));
  2. }
  3. allmapchecked = true;
  4. }
  5.  
  6. IEnumerator LoadAsset (int i,string asseturl,AssetBundle assetbundles)
  7. {
  8. using(WWW www = new WWW(asseturl))
  9. {
  10. yield return www;
  11. if(!string.IsNullOrEmpty(www.error))
  12. {
  13. Debug.Log(www.error);
  14. yield break;
  15. }
  16.  
  17. assetbundles[i] = www.assetBundle;
  18. string[,] assetscenes[i] = assetbundles[i].GetAllScenePaths ();
  19. foreach (string sceneName in assetscenes)
  20. {
  21. Debug.Log(Path.GetFileNameWithoutExtension(sceneName));
  22. }
  23. }
  24.  
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement