Quantcast
Channel: Questions in topic: "assetbundles"
Viewing all articles
Browse latest Browse all 312

UnityWebRequestAssetBundle.GetAssetBundle not working on iOS

$
0
0
UnityWebRequestAssetBundle.GetAssetBundle not working on iOS void LoadAssetFromBundle() { StartCoroutine(GetAssetBundle()); } IEnumerator GetAssetBundle() { UnityWebRequest www = UnityWebRequestAssetBundle.GetAssetBundle("https://brain.rs/rkd/2/assetbundletestios"); yield return www.SendWebRequest(); if (www.isNetworkError || www.isHttpError) { Debug.Log(www.error); } else { AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(www); myLoadedAssetBundle = bundle; if (myLoadedAssetBundle != null) { Debug.Log("It's downloaded"); } } } But it doesn't Debug and whenever I try to instantiate a prefab through this code it says that the Object reference is not set to an instance of an object. If anyone can help me with this, I'd be extremely grateful!

Viewing all articles
Browse latest Browse all 312

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>