Example #1
0
 private void LoadBundle_Completed(ABAsyncOperationHandle <AssetBundle> obj)
 {
     foreach (var item in obj.Result.GetAllAssetNames())
     {
         var newObject = obj.Result.LoadAsset <GameObject>(item);
         Instantiate(newObject);
     }
 }
Example #2
0
 private void LoadBundleAssets_Comleted(ABAsyncOperationHandle <AssetBundle> obj)
 {
     _assetsBundle = obj.Result;
     foreach (var item in obj.Result.LoadAllAssets())
     {
         Instantiate(_panelAssetsPrefab, _containerAssets).GetComponent <PanelAsset>().Initialize(item);
     }
 }
Example #3
0
    private void LoadManifest_Completed(ABAsyncOperationHandle <ABManagerCore.ABManifest> obj)
    {
        ABLoader loader    = new ABLoader();
        var      operation = ABLoader.LoadBundle(obj.Result.Bundles[0], obj.Result);

        operation.Completed += LoadBundle_Completed;
        StartCoroutine(operation);
    }
Example #4
0
 private void LoadManifest_Completed(ABAsyncOperationHandle <ABManifest> obj)
 {
     _manifest = obj.Result;
     _textManifestName.text    = _manifest.Name;
     _textManifestVersion.text = _manifest.Version;
     _textManifestRemote.text  = _manifest.RemoteLoadPath;
     _textManifestLocal.text   = _manifest.LocalLoadPath;
     RemoveAllChilds();
 }
Example #5
0
 private void LoadBundleScenes_Completed(ABAsyncOperationHandle <AssetBundle> obj)
 {
     _scenesBundle = obj.Result;
     if (obj.Result.isStreamedSceneAssetBundle)
     {
         foreach (var item in obj.Result.GetAllScenePaths())
         {
             Instantiate(_panelScenesPrefab, _containerScenes).GetComponent <PanelScene>().Initialize(item);
         }
     }
     else
     {
         foreach (var item in obj.Result.LoadAllAssets())
         {
             Instantiate(_panelAssetsPrefab, _containerAssets).GetComponent <PanelAsset>().Initialize(item);
         }
     }
 }