// TODO: make it possible to dispose image before it started downloading / while downloading public Result loadImage(Url url, bool ignoreQueue = false) => cache .getOrUpdate(url, () => ignoreQueue ? download(url) : new InternalResult(queue.enqueue(url))) .toResult();
// TODO: make it possible to dispose image before it started downloading / while downloading public Future <Either <WWWError, Disposable <Texture2D> > > loadImage(Url url, bool ignoreQueue = false) => cache .getOrUpdate(url, () => ignoreQueue ? download(url) : queue.enqueue(url)) .mapT(dt => dt.use());