public static AsyncLoadRequest AsyncLoad(string resPath, AsyncLoadRequest.AsyncLoadCallBack onAsyncLoadComplete, object context, bool preload) { var request = new AsyncLoadRequest(onAsyncLoadComplete, context, preload); System.Object resObject = ResourceManager.Get(resPath); if (resObject != null) { Callback(resPath, request, resObject as Object); } else { SameRequestCache src; if (Instance_.sameRequestCache_.TryGetValue(resPath, out src)) { src.srcList.Add(request); } else { src = new SameRequestCache(); src.srcList.Add(request); Instance_.sameRequestCache_[resPath] = src; Instance_.requestQueue_.Add(new LoadQueueData(resPath)); } } return(request); }
public static AsyncLoadRequest AsyncLoad(string resPath, AsyncLoadRequest.AsyncLoadCallBack onAsyncLoadComplete, object context) { return(AsyncLoad(resPath, onAsyncLoadComplete, context, false)); }