string ILocationServices.ConvertLocationToAssetPath(string location)
 {
     if (string.IsNullOrEmpty(_resourceRoot))
     {
         return(YooAssets.MappingToAssetPath(location));
     }
     else
     {
         string tempLocation = $"{_resourceRoot}/{location}";
         return(YooAssets.MappingToAssetPath(tempLocation));
     }
 }
 /// <summary>
 /// 获取资源版本号
 /// </summary>
 public int GetResourceVersion()
 {
     return(YooAssets.GetResourceVersion());
 }
 /// <summary>
 /// 更新补丁清单
 /// </summary>
 /// <param name="updateResourceVersion">更新的资源版本号</param>
 /// <param name="timeout">超时时间</param>
 public UpdateManifestOperation UpdateManifestAsync(int updateResourceVersion, int timeout)
 {
     return(YooAssets.UpdateManifestAsync(updateResourceVersion, timeout));
 }
 /// <summary>
 /// 异步初始化
 /// </summary>
 public InitializationOperation InitializeAsync()
 {
     return(YooAssets.InitializeAsync(_createParameters));
 }
 /// <summary>
 /// 获取沙盒文件夹的路径
 /// </summary>
 public static string GetSandboxRoot()
 {
     return(YooAssets.GetSandboxRoot());
 }
 /// <summary>
 /// 清空沙盒目录
 /// 注意:可以使用该方法修复我们本地的客户端
 /// </summary>
 public void ClearSandbox()
 {
     YooAssets.ClearSandbox();
 }
 private void SampleBtn_onClick()
 {
     YooAssets.GetDebugReport(_debugReport);
     _assetListViewer.FillViewData(_debugReport, _searchKeyWord);
     _bundleListViewer.FillViewData(_debugReport, _searchKeyWord);
 }
 /// <summary>
 /// 资源回收(卸载引用计数为零的资源)
 /// </summary>
 public void UnloadUnusedAssets()
 {
     YooAssets.UnloadUnusedAssets();
 }
 public SubAssetsOperationHandle LoadSubAssetsAsync(System.Type type, string location)
 {
     return(YooAssets.LoadSubAssetsAsync(location, type));
 }
Example #10
0
 /// <summary>
 /// 异步加载子资源对象集合
 /// </summary>
 /// <param name="location">资源对象相对路径</param>
 public SubAssetsOperationHandle LoadSubAssetsAsync <TObject>(string location)
 {
     return(YooAssets.LoadSubAssetsAsync <TObject>(location));
 }
Example #11
0
 /// <summary>
 /// 异步加载资源对象
 /// </summary>
 /// <param name="location">资源对象相对路径</param>
 public AssetOperationHandle LoadAssetAsync <TObject>(string location)
 {
     return(YooAssets.LoadAssetAsync <TObject>(location));
 }
Example #12
0
 public AssetOperationHandle LoadAssetSync(System.Type type, string location)
 {
     return(YooAssets.LoadAssetSync(location, type));
 }
Example #13
0
 /// <summary>
 /// 同步加载资源对象
 /// </summary>
 /// <param name="location">资源对象相对路径</param>
 public AssetOperationHandle LoadAssetSync <TObject>(string location) where TObject : class
 {
     return(YooAssets.LoadAssetSync <TObject>(location));
 }
Example #14
0
 /// <summary>
 /// 异步加载场景
 /// </summary>
 public SceneOperationHandle LoadSceneAsync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, bool activeOnLoad = true, int priority = 100)
 {
     return(YooAssets.LoadSceneAsync(location, sceneMode, activeOnLoad, priority));
 }
Example #15
0
 /// <summary>
 /// 强制回收所有资源
 /// </summary>
 public void ForceUnloadAllAssets()
 {
     YooAssets.ForceUnloadAllAssets();
 }
Example #16
0
 /// <summary>
 /// 是否需要从远端更新下载
 /// </summary>
 /// <param name="location">资源的定位地址</param>
 public bool IsNeedDownloadFromRemote(string location)
 {
     return(YooAssets.IsNeedDownloadFromRemote(location));
 }
Example #17
0
 /// <summary>
 /// 获取资源对象信息列表
 /// </summary>
 public AssetInfo[] GetBundleInfo(string[] tags)
 {
     return(YooAssets.GetAssetInfos(tags));
 }
Example #18
0
 /// <summary>
 /// 创建补丁下载器
 /// </summary>
 /// <param name="dlcTags">DLC标记列表</param>
 /// <param name="fileLoadingMaxNumber">同时下载的最大文件数</param>
 /// <param name="failedTryAgain">下载失败的重试次数</param>
 public DownloaderOperation CreateDLCDownloader(string[] dlcTags, int fileLoadingMaxNumber, int failedTryAgain)
 {
     return(YooAssets.CreatePatchDownloader(dlcTags, fileLoadingMaxNumber, failedTryAgain));
 }
 string ILocationServices.ConvertLocationToAssetPath(string location)
 {
     return(YooAssets.MappingToAssetPath(location));
 }
Example #20
0
 /// <summary>
 /// 创建补丁下载器
 /// </summary>
 /// <param name="locations">资源列表</param>
 /// <param name="fileLoadingMaxNumber">同时下载的最大文件数</param>
 /// <param name="failedTryAgain">下载失败的重试次数</param>
 public DownloaderOperation CreateBundleDownloader(string[] locations, int fileLoadingMaxNumber, int failedTryAgain)
 {
     return(YooAssets.CreateBundleDownloader(locations, fileLoadingMaxNumber, failedTryAgain));
 }