Пример #1
0
        internal override void Load()
        {
            BundleRequest = Assets.LoadBundleAsync(assetBundleName);
            var bundles = Assets.GetAllDependencies(assetBundleName);

            foreach (var item in bundles)
            {
                children.Add(Assets.LoadBundleAsync(item));
            }
            loadState = LoadState.LoadAssetBundle;
        }
Пример #2
0
 internal override void Load()
 {
     if (!string.IsNullOrEmpty(assetBundleName))
     {
         BundleRequest = Assets.LoadBundleAsync(assetBundleName);
         var bundles = Assets.GetAllDependencies(assetBundleName);
         foreach (var item in bundles)
         {
             children.Add(Assets.LoadBundleAsync(item));
         }
         loadState = LoadState.LoadAssetBundle;
     }
     else
     {
         LoadScene();
     }
 }
Пример #3
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;
 }
Пример #4
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;
        }