//不包含路径的预设体名, public UObj GetResource(string PrefabName) { UObj obj = null; string ABname = ResourceSetting.ConvertToAssetBundleName(PrefabName); if (dicAsset.TryGetValue(ABname, out obj) == false) { if (dicLoadingReq.ContainsKey(ABname)) { ConsoleEx.DebugLog("<GetResource Failed> Res is still loading, res.Name = " + ABname); } else { // ConsoleEx.DebugLog("<GetResource Failed> Res not exist, res.Name = " + ABname); } obj = null; } else { // 添加引用 RefAsset(ABname); } return(obj); }
public WWW GetLoadingWWW(string pbName) { string AssetBundleName = ResourceSetting.ConvertToAssetBundleName(pbName); WWW www = null; dicLoadingReq.TryGetValue(AssetBundleName, out www); return(www); }
public bool IsResLoaded(string pbName) { string AssetBundleName = ResourceSetting.ConvertToAssetBundleName(pbName); return(dicAsset.ContainsKey(AssetBundleName)); }