Esempio n. 1
0
        public static void Build()
        {
            var outputPath = EditorUtility.SaveFolderPanel("Choose Location of Output", "", "");

            if (outputPath.Length == 0)
            {
                return;
            }

            string[] levels = GetLevelsFromBuildSettings();
            if (levels.Length == 0)
            {
                Debug.Log("Nothing to build.");
                return;
            }

            string targetName = GetBuildTargetName(EditorUserBuildSettings.activeBuildTarget);

            if (targetName == null)
            {
                return;
            }

            BuildAssetBundles.Build();

            BuildOptions option = EditorUserBuildSettings.development ? BuildOptions.Development : BuildOptions.None;

            BuildPipeline.BuildPlayer(levels, outputPath + targetName, EditorUserBuildSettings.activeBuildTarget, option);
        }
Esempio n. 2
0
 static public void RefreshABNames()
 {
     try
     {
         BuildAssetBundles.RefreshAssetBundleNames();
     }
     catch (System.Exception e)
     {
         Debug.LogError(e.ToString());
     }
 }
Esempio n. 3
0
        static public void BuildABWin64()
        {
            try
            {
                EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows64);

                BuildAssetBundles.Build();
            }
            catch (System.Exception e)
            {
                Debug.LogError(e.ToString());
            }
        }
Esempio n. 4
0
        static public void BuildABIOS()
        {
            try
            {
                EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.iOS, BuildTarget.iOS);

                BuildAssetBundles.Build();
            }
            catch (System.Exception e)
            {
                Debug.LogError(e.ToString());
            }
        }