Esempio n. 1
0
 public static AssetBundleManagar initForGameObject(GameObject dontDestroyOnLoadGameObject)
 {
     if (instance == null)
     {
         instance = dontDestroyOnLoadGameObject.AddComponent <AssetBundleManagar>();
     }
     return(instance);
 }
Esempio n. 2
0
 public static AssetBundleManagar getInstance()
 {
     if (instance == null)
     {
         GameObject gameObject = new GameObject("AssetBundleManagar");
         DontDestroyOnLoad(gameObject);
         instance = gameObject.AddComponent <AssetBundleManagar>();
     }
     return(instance);
 }
Esempio n. 3
0
 override public void LoadAssetBundle()
 {
     if (assetBundlePath != null && !assetBundlePath.Equals(""))
     {
         AssetBundleManagar.getInstance().Load(assetBundlePath, OnLoadAssetBundle);
     }
     else
     {
         Debug.LogErrorFormat("LoadAssetBundle() 参数错误!{0}", this.ToString());
     }
 }