LoadAssetBundleInternal() protected static method

protected static LoadAssetBundleInternal ( string assetBundleName, bool isLoadingAssetBundleManifest ) : bool
assetBundleName string
isLoadingAssetBundleManifest bool
return bool
コード例 #1
0
ファイル: AssetBundleManager.cs プロジェクト: K07H/The-Forest
 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);
     }
 }
コード例 #2
0
ファイル: AssetBundleManager.cs プロジェクト: K07H/The-Forest
 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);
         }
     }
 }