コード例 #1
0
        public void LoadManifestAssetBundle(string abPath)
        {
            SetupAbRoot(abPath);
            _coreManifest = _loader.GetAsset <AssetBundleManifest>(abPath, "AssetBundleManifest");

            if (_coreManifest != null)
            {
                _manifestLoaded = true;
            }
        }
コード例 #2
0
        public void LoadManifestAssetBundle(string abPath)
        {
            _coreManifest = _loader.GetAsset <AssetBundleManifest>(abPath, "AssetBundleManifest");

            if (_coreManifest != null)
            {
                _coreManifestDir = Path.GetDirectoryName(abPath);

                _manifestLoaded = true;
            }
        }
コード例 #3
0
        public T GetAsset <T>(string abPath, string assetName) where T : Object
        {
            T asset = GetAssetFromCache <T>(abPath, assetName);

            if (asset == null)
            {
                asset = _abLoader?.GetAsset <T>(abPath, assetName);

                SetAssetToCache(abPath, assetName, asset);
            }

            return(asset);
        }
コード例 #4
0
ファイル: ResManager.cs プロジェクト: MingUnity/MGFramework
 /// <summary>
 /// 同步获取资源
 /// </summary>
 /// <typeparam name="T">资源类型</typeparam>
 /// <param name="abPath">资源ab包路径</param>
 /// <param name="assetName">资源名</param>
 public T GetAsset <T>(string abPath, string assetName) where T : UnityEngine.Object
 {
     return(_loader?.GetAsset <T>(abPath, assetName));
 }