private AssetBundle LoadAssetBundle(string assetBundleName) { AssetBundle resAssetBundle = null; if (!m_LoadAssetBundleDict.TryGetValue(assetBundleName, out resAssetBundle)) { string fullPath = FrameworkUtil.GetRealPath(assetBundleName); resAssetBundle = AssetBundle.LoadFromFile(fullPath); if (resAssetBundle != null) { m_LoadAssetBundleDict.Add(assetBundleName, resAssetBundle); } else { Debug.Log("【assetbundle load】 fail! path:" + fullPath); } } return(resAssetBundle); }
public void Init() { AssetBundle assetbundle = AssetBundle.LoadFromFile(FrameworkUtil.GetRealPath("Main")); m_AssetBundleManifest = assetbundle.LoadAsset("AssetBundleManifest") as AssetBundleManifest; }