Exemplo n.º 1
0
        static void DoBuild(BuildTarget target, BuildOptions opts)
        {
            var scenes = (from e in EditorBuildSettings.scenes
                          where e != null && e.enabled
                          select e.path).ToArray();

            var path = Path.Combine(BuildPath, target.ToString());

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            var bundlePath = path;

            switch (target)
            {
            case BuildTarget.StandaloneWindows:
            case BuildTarget.StandaloneWindows64:
                path       = Path.Combine(path, ExeName + ".exe");
                bundlePath = Path.Combine(bundlePath, ExeName + "_Data");
                break;

            case BuildTarget.StandaloneOSXIntel:
                path       = Path.Combine(path, ExeName + ".app");
                bundlePath = Path.Combine(path, "Contents");
                break;

            case BuildTarget.iPhone:
                bundlePath = Path.Combine(path, "Data");
                break;
            }

            BuildPipeline.BuildPlayer(scenes, path, target, opts);
            Bundles.DoBuildBundles(bundlePath, false, target);
        }
Exemplo n.º 2
0
 public static void RebuildBundles()
 {
     Bundles.DoBuildBundles(null, true, BuildTarget.WebPlayer);
 }
Exemplo n.º 3
0
 public static void BuildBundles()
 {
     Bundles.DoBuildBundles(null, false, BuildTarget.WebPlayer);
 }