コード例 #1
0
 public static void DeleteAssetByUrl(string url)
 {
     try
     {
         string path = url.Replace(PandoraSettings.GetFileProtocolToken(), string.Empty);
         if (File.Exists(path))
         {
             File.Delete(path);
         }
     }
     catch (Exception ex)
     {
         string text = "删除文件发生异常,Url: " + url + "\n" + ex.Message;
         Logger.LogError(text);
         Pandora.Instance.ReportError(text, 0);
     }
 }
コード例 #2
0
 public static string GetCachedAssetUrl(string url)
 {
     return(PandoraSettings.GetFileProtocolToken() + CacheManager.GetCachedAssetPath(url));
 }
コード例 #3
0
 public static string GetStreamingAssetsUrl()
 {
     return(PandoraSettings.GetFileProtocolToken() + Application.streamingAssetsPath + "/Pandora");
 }