public static void ReadLocalFile(string path, ResourceTool.FinishReadNotify notify) { ResourceTool.DownloadCommand item = default(ResourceTool.DownloadCommand); string str = "file:///"; item.resource = new WWW(str + path); Debug.Log("url =" + item.resource.url); item.notify = notify; ResourceTool.msDownloadCommands.Add(item); }
public static WWW ReadNetFile(string path, bool isCache, ResourceTool.FinishReadNotify notify) { WWW wWW = null; HashName hashName = new HashName(path); if (ResourceTool.msCache.TryGetValue(hashName.GetId(), out wWW)) { notify(true, wWW); return wWW; } ResourceTool.DownloadCommand item = default(ResourceTool.DownloadCommand); item.resource = new WWW(path); item.isCache = isCache; item.notify = notify; ResourceTool.msDownloadCommands.Add(item); return item.resource; }
public DownloadFileToLocal(string path, ResourceTool.FinishDownloadNotify notify) { this.mPath = path; this.mNotify = notify; }
public static void DownloadFile(string fromPath, string toPath, ResourceTool.FinishDownloadNotify notify) { ResourceTool.DownloadFileToLocal @object = new ResourceTool.DownloadFileToLocal(toPath, notify); ResourceTool.ReadNetFile(fromPath, false, new ResourceTool.FinishReadNotify(@object.FinishDownLoad)); }