public IEnumerator Load(string source, Func <T, IEnumerator> finish = null, Action <string> error = null, Action <float, string> progress = null) { finishLoad = finish; errorLoad = error; progressLoad = progress; cacheSource = CacheFileLoader.CacheStreamKey(source); isInProgress = true; yield return(childLoader.Load(source)); }
public override IEnumerator BeforeLoad(string source) { //create query string from url memoryKey = CacheFileLoader.CacheStreamKey(source); //query from image dictionary //if we have a texture with this key //we can take it and break; if (memoryData.ContainsKey(memoryKey)) { InnerFinishLoad(memoryData[memoryKey]); yield break; } }