Пример #1
0
    public static void BuildResources(params BuildTarget[] targets)
    {
        EditorUtility.DisplayProgressBar("General", "Mark AssetBundles", 0f);
        AssetBundleMaker.Mark();

        foreach (var target in targets)
        {
            BuildSelectedResources(target);
        }

        AssetBundleMaker.Unmark();
        EditorUtility.ClearProgressBar();
        Debug.Log("Done!");
    }
Пример #2
0
    public static void BuildSelectedResources(BuildTarget buildTarget)
    {
        EditorUtility.DisplayProgressBar(buildTarget.ToString(), "Make AssetBundles", 0f);
        using (var hideCompileFlags = new HideCompileFlags())
            AssetBundleMaker.Build(buildTarget);

        EditorUtility.DisplayProgressBar(buildTarget.ToString(), "Copy To Product", 0f);
        CopyFilesToProduct(buildTarget);

        EditorUtility.DisplayProgressBar(buildTarget.ToString(), "Generate FileManifest", 0f);
        GenerateFileManifest.Generate(buildTarget);

        EditorUtility.DisplayProgressBar(buildTarget.ToString(), "Generate Version", 0f);
        GenerateVersion.Generate(vconf, buildTarget);

        Debug.Log("Build resources for " + buildTarget);
    }