public IWWWMgr GetWWWMgr() { if (mWWWMgr == null) { mWWWMgr = new WWWMgr(mAssetPool); } return(mWWWMgr); }
private void HandleLoadWWWResAsync <T>(string url, AsynvLoadCallback <T> callback) where T : UnityEngine.Object { IWWWMgr wwwMgr = GetWWWMgr(); T asset = wwwMgr.TryLoadFromCache <T>(WWWType.DEFAULT, url); if (asset != null && callback != null) { callback(asset); return; } wwwMgr.BuildRequest(WWWType.DEFAULT, url) .SetSuccessCallback(delegate(WWWRequestHandle handle) { asset = wwwMgr.TryLoadFromCache <T>(WWWType.DEFAULT, url); if (callback != null) { callback(asset); } }).Get(); }