Exemplo n.º 1
0
        internal override void Load()
        {
            bundle = Assets.LoadBundle(assetBundleName);
            var assetName = Path.GetFileName(url);

            asset = bundle.assetBundle.LoadAsset(assetName, assetType);
        }
Exemplo n.º 2
0
 internal override void Load()
 {
     if (!string.IsNullOrEmpty(assetBundleName))
     {
         bundle = Assets.LoadBundle(assetBundleName);
         if (bundle != null)
         {
             SceneManager.LoadScene(sceneName, loadSceneMode);
         }
     }
     else
     {
         try
         {
             SceneManager.LoadScene(sceneName, loadSceneMode);
             loadState = LoadState.LoadAsset;
         }
         catch (Exception e)
         {
             Debug.LogException(e);
             error     = e.ToString();
             loadState = LoadState.Loaded;
         }
     }
 }
Exemplo n.º 3
0
 internal override void Load()
 {
     if (!string.IsNullOrEmpty(assetBundleName))
     {
         bundle = Assets.LoadBundle(assetBundleName);
         if (bundle != null)
         {
             var bundles = Assets.GetChildren(assetBundleName);
             foreach (var item in bundles)
             {
                 children.Add(Assets.LoadBundle(item));
             }
             SceneManager.LoadScene(sceneName, loadSceneMode);
         }
     }
     else
     {
         try
         {
             SceneManager.LoadScene(sceneName, loadSceneMode);
             loadState = LoadState.Loading;
         }
         catch (Exception e)
         {
             Debug.LogException(e);
             error = e.ToString();
         }
     }
     loadState = LoadState.Loaded;
 }
Exemplo n.º 4
0
        internal override void Load()
        {
            bundle = Assets.LoadBundle(assetBundleName);
            var bundles = Assets.GetChildren(assetBundleName);

            foreach (var item in bundles)
            {
                children.Add(Assets.LoadBundle(item));
            }
            //var assetName = Path.GetFileName(url);
            asset     = bundle.assetBundle.LoadAsset(url, assetType);
            loadState = LoadState.Loaded;
        }
Exemplo n.º 5
0
 internal override void Load()
 {
     if (Assets.assetBundleMode)
     {
         var bundleRequest = Assets.LoadBundle(Assets.platform, true, true);
         loadState = LoadState.LoadAssetBundle;
         bundleRequest.completed = BundleRequest_completed;
     }
     else
     {
         loadState = LoadState.Loaded;
     }
 }
Exemplo n.º 6
0
 internal override void Load()
 {
     _assetName = Path.GetFileName(url);
     if (Assets.runtimeMode)
     {
         var assetBundleName = _assetName.Replace(".asset", ".unity3d").ToLower();
         _request           = Assets.LoadBundle(assetBundleName, true);
         _request.completed = Request_completed;
         loadState          = LoadState.LoadAssetBundle;
     }
     else
     {
         loadState = LoadState.Loaded;
     }
 }
Exemplo n.º 7
0
 internal override void Load()
 {
     if (!string.IsNullOrEmpty(assetBundleName))
     {
         bundle = Assets.LoadBundle(assetBundleName);
         if (bundle != null)
         {
             SceneManager.LoadScene(sceneName, loadSceneMode);
         }
     }
     else
     {
         SceneManager.LoadScene(sceneName, loadSceneMode);
     }
 }
Exemplo n.º 8
0
 internal override void Load()
 {
     if (!string.IsNullOrEmpty(assetBundleName))
     {
         BundleRequest = Assets.LoadBundle(assetBundleName);
         if (BundleRequest != null)
         {
             var bundles = Assets.GetAllDependencies(assetBundleName);
             foreach (var item in bundles)
             {
                 children.Add(Assets.LoadBundle(item));
             }
             SceneManager.LoadScene(sceneName, loadSceneMode);
         }
     }
     else
     {
         SceneManager.LoadScene(sceneName, loadSceneMode);
     }
     loadState = LoadState.Loaded;
 }
Exemplo n.º 9
0
        internal override void Load()
        {
            BundleRequest = Assets.LoadBundle(assetBundleName);
            var names = Assets.GetAllDependencies(assetBundleName);

            foreach (var item in names)
            {
                children.Add(Assets.LoadBundle(item));
            }
            var assetName = Path.GetFileName(name);
            var ab        = BundleRequest.assetBundle;

            if (ab != null)
            {
                asset = ab.LoadAsset(assetName, assetType);
            }
            if (asset == null)
            {
                error = "asset == null";
            }
            loadState = LoadState.Loaded;
        }