LoadAssetBundleInternal() protected static method

protected static LoadAssetBundleInternal ( string assetBundleName, bool isLoadingAssetBundleManifest ) : bool
assetBundleName string
isLoadingAssetBundleManifest bool
return bool
Ejemplo n.º 1
0
 protected static void LoadAssetBundle(string assetBundleName, bool isLoadingAssetBundleManifest = false)
 {
     if (!isLoadingAssetBundleManifest && AssetBundleManager.m_AssetBundleManifest == null)
     {
         return;
     }
     if (!AssetBundleManager.LoadAssetBundleInternal(assetBundleName, isLoadingAssetBundleManifest) && !isLoadingAssetBundleManifest)
     {
         AssetBundleManager.LoadDependencies(assetBundleName);
     }
 }
Ejemplo n.º 2
0
 protected static void LoadDependencies(string assetBundleName)
 {
     if (AssetBundleManager.m_AssetBundleManifest == null)
     {
         Debug.LogError("Please initialize AssetBundleManifest by calling AssetBundleManager.Initialize()");
         return;
     }
     if (!AssetBundleManager.m_Dependencies.ContainsKey(assetBundleName))
     {
         string[] allDependencies = AssetBundleManager.m_AssetBundleManifest.GetAllDependencies(assetBundleName);
         if (allDependencies.Length == 0)
         {
             return;
         }
         AssetBundleManager.m_Dependencies.Add(assetBundleName, allDependencies);
         for (int i = 0; i < allDependencies.Length; i++)
         {
             AssetBundleManager.LoadAssetBundleInternal(allDependencies[i], false);
         }
     }
 }