public void Initialize() { LogUtil.LogGreen(GameConfig.AssetPath("StreamingAssets")); AssetBundle assetBundle = AssetBundle.LoadFromFile(GameConfig.AssetPath("StreamingAssets")); manifest = (AssetBundleManifest)assetBundle.LoadAsset("AssetBundleManifest", typeof(AssetBundleManifest)); LoadSprite(ResType.Atlas, "common"); }
private bool LoadAssetBundleInternal(string abPath) { AssetBundleData bundle = null; if (dicAssetBundle.TryGetValue(abPath, out bundle)) { bundle.ReferencedCount++; return(true); } if (dicAssetBundleCreateRequest.ContainsKey(abPath)) { dicAssetBundleCreateRequestCount[abPath] += 1; return(true); } AssetBundleCreateRequest req = AssetBundle.LoadFromFileAsync(GameConfig.AssetPath(abPath)); dicAssetBundleCreateRequest.Add(abPath, req); dicAssetBundleCreateRequestCount.Add(abPath, 1); LogUtil.LogYellow("加载资源-----------> " + abPath); return(false); }