Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active September 19, 2015 07:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tsubaki/6e5fa489e8fa0ce4c42e to your computer and use it in GitHub Desktop.
Save tsubaki/6e5fa489e8fa0ce4c42e to your computer and use it in GitHub Desktop.
AssetBundleからシーンを読む
using UnityEngine;
using System.Collections;
public class LoadABScene : MonoBehaviour {
[SerializeField] string sceneName = "Demo";
[SerializeField] string assetBundleName = "demo";
IEnumerator Start()
{
WWW www = new WWW("file://" + Application.streamingAssetsPath + "/" + assetBundleName);
yield return www;
AssetBundle bundle = www.assetBundle;
Application.LoadLevel (sceneName);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment