Beispiel #1
0
    public static void Reload()
    {
        if (_asserBundleManifest == null)
        {
            AssetBundle manifestBundle = FileEncrypt.LoadFromFile(Application.streamingAssetsPath + "/" + SGK.PatchManager.GetPlatformName(), out manifestBundleFileStream);
            if (manifestBundle != null)
            {
                _asserBundleManifest = manifestBundle.LoadAsset <AssetBundleManifest>("AssetBundleManifest");
            }
        }

        root = new AssetBundleInfo("", false);

        if (_asserBundleManifest == null)
        {
            return;
        }

        string[] bundles = _asserBundleManifest.GetAllAssetBundles();
        for (int i = 0; i < bundles.Length; i++)
        {
            string[]        keys   = bundles[i].Split('/');
            AssetBundleInfo parent = root;
            for (int j = 0; j < keys.Length; j++)
            {
                parent = parent.Add(keys[j], j == (keys.Length - 1));
            }
        }
    }
Beispiel #2
0
    public static void Replace(string path, AssetBundle assetBundle)
    {
        string[]        keys   = path.Split('/');
        AssetBundleInfo parent = root;

        for (int j = 0; j < keys.Length; j++)
        {
            parent = parent.Add(keys[j], j == (keys.Length - 1));
        }
        parent.assetBundle = assetBundle;
    }
Beispiel #3
0
    public static void Replace(string path, string fullPath)
    {
        if (root == null)
        {
            return;
        }
        string[]        keys   = path.Split('/');
        AssetBundleInfo parent = root;

        for (int j = 0; j < keys.Length; j++)
        {
            parent = parent.Add(keys[j], j == (keys.Length - 1));
        }
        parent.pathPath = fullPath;
    }