private static AssetBundle LoadObjectFromAssetFile(string assetName) { WWW www = new WWW(Statics.AssetBundleStoragePath + assetName); AssetBundle bundle = www.assetBundle; AssetsBag.GetInstance().Add(assetName, bundle); return(bundle); }
private static bool IfLoadedBefore(string assetName, out AssetBundle ao) { var alist = AssetsBag.GetInstance().GetAllLoadedAssetsName(); foreach (var a in alist) { if (a.Equals(assetName)) { ao = AssetsBag.GetInstance().GetAssetBundleByName(a); return(true); } } ao = null; return(false); }
private AssetsBag() { _instance = this; }