Example #1
0
 public virtual IEnumerator Load()
 {
     string[] directories = Directory.GetDirectories(DLCAssetMgr.GetDLCRootPath());
     foreach (var directoryPath in directories)
     {
         DLCAssetMgr.LoadDLC(BaseFileUtils.GetFinalDirectoryName(directoryPath));
         yield return(new WaitForEndOfFrame());
     }
 }
Example #2
0
        public virtual T LoadAsset <T>(string bundleName, string assetName) where T : UnityEngine.Object
        {
            var temp = DLCAssetMgr.LoadAsset <T>(bundleName, assetName);

            if (temp == null)
            {
                return(null);
            }
            return(temp.asset as T);
        }
Example #3
0
 public virtual Asset LoadScene(string bundleName, string assetName)
 {
     return(DLCAssetMgr.LoadScene(bundleName, assetName));
 }
Example #4
0
 public virtual Asset LoadAssetAsync <T>(string bundleName, string assetName)
 {
     return(DLCAssetMgr.LoadAssetAsync <T>(bundleName, assetName));
 }
Example #5
0
 /// <summary>
 /// 卸载资源
 /// </summary>
 public virtual void UnloadAsset(Asset asset)
 {
     DLCAssetMgr.UnloadAsset(asset);
 }