示例#1
0
    public SDictionary <int, UnityEngine.Object> LoadAll(string bundleName, ELoadType loadType)
    {
        if (string.IsNullOrEmpty(bundleName))
        {
            return(null);
        }

        LoadedAssetBundle loaded = ABManager.Instance.GetLoadedBundle(bundleName.GetHashCode());

        if (loaded != null)
        {
            loaded.Count();
        }
        else
        {
            loaded = LoadSyn(bundleName);
        }

        if (loaded != null)
        {
            loaded.mLoadType = loadType;
            if (loaded.mAssetBundle != null)
            {
                loaded.MapAssets();
                ABManager.Instance.AfterLoad(loaded);
            }
            return(loaded.GetAllAssets());
        }
        return(null);
    }