public bool TryGet(string url, Action <object> onloaded, Action <object> progressEvent = null, BumResourceType resType = BumResourceType.eBumResourceType_assetBundle, BumResourcePoolType resourcePoolType = BumResourcePoolType.ProductObject, object param = null, Action <GameObject, object> beforeClone = null) { LoadPoolData loopdata = null; bool hasPool = poolDic.TryGetValue(url, out loopdata); if (hasPool) { if (onloaded != null) { onloaded(loopdata.resouce); } if (progressEvent != null) { progressEvent(1.0f); } if (beforeClone != null) { beforeClone(loopdata.resouce as GameObject, param); } } return(hasPool); //GameObject resource = getPoolObject(url, resourcePoolType); //if (resource == null) //{ // resource = (GameObject)GameObject.Instantiate<GameObject>(loopdata.resouce as GameObject); // Rest(resource, resourcePoolType); //} }
public bool TryGet(string key, out LoadPoolData value) { return(pool.TryGetValue(key, out value)); }