string ILocationServices.ConvertLocationToAssetPath(string location)
 {
     if (string.IsNullOrEmpty(_resourceRoot))
     {
         return(YooAssets.MappingToAssetPath(location));
     }
     else
     {
         string tempLocation = $"{_resourceRoot}/{location}";
         return(YooAssets.MappingToAssetPath(tempLocation));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 获取资源版本号
 /// </summary>
 public int GetResourceVersion()
 {
     return(YooAssets.GetResourceVersion());
 }
Exemplo n.º 3
0
 /// <summary>
 /// 更新补丁清单
 /// </summary>
 /// <param name="updateResourceVersion">更新的资源版本号</param>
 /// <param name="timeout">超时时间</param>
 public UpdateManifestOperation UpdateManifestAsync(int updateResourceVersion, int timeout)
 {
     return(YooAssets.UpdateManifestAsync(updateResourceVersion, timeout));
 }
Exemplo n.º 4
0
 /// <summary>
 /// 异步初始化
 /// </summary>
 public InitializationOperation InitializeAsync()
 {
     return(YooAssets.InitializeAsync(_createParameters));
 }
Exemplo n.º 5
0
 /// <summary>
 /// 获取沙盒文件夹的路径
 /// </summary>
 public static string GetSandboxRoot()
 {
     return(YooAssets.GetSandboxRoot());
 }
Exemplo n.º 6
0
 /// <summary>
 /// 清空沙盒目录
 /// 注意:可以使用该方法修复我们本地的客户端
 /// </summary>
 public void ClearSandbox()
 {
     YooAssets.ClearSandbox();
 }
 private void SampleBtn_onClick()
 {
     YooAssets.GetDebugReport(_debugReport);
     _assetListViewer.FillViewData(_debugReport, _searchKeyWord);
     _bundleListViewer.FillViewData(_debugReport, _searchKeyWord);
 }
Exemplo n.º 8
0
 /// <summary>
 /// 资源回收(卸载引用计数为零的资源)
 /// </summary>
 public void UnloadUnusedAssets()
 {
     YooAssets.UnloadUnusedAssets();
 }
Exemplo n.º 9
0
 public SubAssetsOperationHandle LoadSubAssetsAsync(System.Type type, string location)
 {
     return(YooAssets.LoadSubAssetsAsync(location, type));
 }
Exemplo n.º 10
0
 /// <summary>
 /// 异步加载子资源对象集合
 /// </summary>
 /// <param name="location">资源对象相对路径</param>
 public SubAssetsOperationHandle LoadSubAssetsAsync <TObject>(string location)
 {
     return(YooAssets.LoadSubAssetsAsync <TObject>(location));
 }
Exemplo n.º 11
0
 /// <summary>
 /// 异步加载资源对象
 /// </summary>
 /// <param name="location">资源对象相对路径</param>
 public AssetOperationHandle LoadAssetAsync <TObject>(string location)
 {
     return(YooAssets.LoadAssetAsync <TObject>(location));
 }
Exemplo n.º 12
0
 public AssetOperationHandle LoadAssetSync(System.Type type, string location)
 {
     return(YooAssets.LoadAssetSync(location, type));
 }
Exemplo n.º 13
0
 /// <summary>
 /// 同步加载资源对象
 /// </summary>
 /// <param name="location">资源对象相对路径</param>
 public AssetOperationHandle LoadAssetSync <TObject>(string location) where TObject : class
 {
     return(YooAssets.LoadAssetSync <TObject>(location));
 }
Exemplo n.º 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));
 }
Exemplo n.º 15
0
 /// <summary>
 /// 强制回收所有资源
 /// </summary>
 public void ForceUnloadAllAssets()
 {
     YooAssets.ForceUnloadAllAssets();
 }
Exemplo n.º 16
0
 /// <summary>
 /// 是否需要从远端更新下载
 /// </summary>
 /// <param name="location">资源的定位地址</param>
 public bool IsNeedDownloadFromRemote(string location)
 {
     return(YooAssets.IsNeedDownloadFromRemote(location));
 }
Exemplo n.º 17
0
 /// <summary>
 /// 获取资源对象信息列表
 /// </summary>
 public AssetInfo[] GetBundleInfo(string[] tags)
 {
     return(YooAssets.GetAssetInfos(tags));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }