Skip to content

Instantly share code, notes, and snippets.

@unity3dcollege
Created June 4, 2017 19:21
Show Gist options
  • Save unity3dcollege/ec47f3fa60faea52ee8440bc535aa9d1 to your computer and use it in GitHub Desktop.
Save unity3dcollege/ec47f3fa60faea52ee8440bc535aa9d1 to your computer and use it in GitHub Desktop.
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
public class Loader : MonoBehaviour
{
private AssetBundleCreateRequest bundleRequest;
private UnityWebRequest request;
private void Start()
{
request = UnityWebRequest.GetAssetBundle("https://unity3dcollegedownloads.blob.core.windows.net/assetbundles/StreamingAssets/Windows/level1");
request.Send();
}
private void Update()
{
if (request.isDone)
{
AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(request);
SceneManager.LoadScene("Level1");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment