예제 #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());
     }
 }
예제 #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);
        }
예제 #3
0
 public virtual Asset LoadScene(string bundleName, string assetName)
 {
     return(DLCAssetMgr.LoadScene(bundleName, assetName));
 }
예제 #4
0
 public virtual Asset LoadAssetAsync <T>(string bundleName, string assetName)
 {
     return(DLCAssetMgr.LoadAssetAsync <T>(bundleName, assetName));
 }
예제 #5
0
 /// <summary>
 /// 卸载资源
 /// </summary>
 public virtual void UnloadAsset(Asset asset)
 {
     DLCAssetMgr.UnloadAsset(asset);
 }