// Use this for initialization void Awake() { //Application.logMessageReceived += (condition, trace, type) => //{ // LogText.text = condition + "\n" + LogText.text; //}; loader.Init((() => Debug.Log("AssetBundle Init Done"))); }
public static AssetBundleLoader GetInstance(string url, string menu) { AssetBundleLoader instance = null; if (!loaderDic.TryGetValue(url, out instance)) { lock (lockHelper) { if (instance == null && !isQuit) { GameObject go = new GameObject(url); instance = go.AddComponent <AssetBundleLoader>(); instance.Init(url, menu); loaderDic.Add(url, instance); } } } return(instance); }
//重置资源管理器 //卸载所有的资源包 //重新初始化资源加载器 public void Reset() { UnloadAll(); abLoader.Init("res"); }