Esempio n. 1
0
    public static Manifest GetCurrentManifest()
    {
        var    buildTarget = EditorUserBuildSettings.activeBuildTarget;
        string channelName = PackageUtils.GetCurSelectedChannel().ToString();

        string   path     = PackageUtils.GetAssetbundleManifestPath(buildTarget, channelName);
        Manifest manifest = new Manifest();

        if (File.Exists(path))
        {
            AssetBundle assetBundle = AssetBundle.LoadFromFile(path);
            manifest.LoadFromAssetbundle(assetBundle);
            assetBundle.Unload(false);
        }

        return(manifest);
    }