AssetBundleからシーンを読む
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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