示例#1
0
        protected virtual void DrawBuild(ProjectBuilder builder)
        {
            using (new EditorGUILayout.HorizontalScope())
            {
                EditorGUI.BeginDisabledGroup(!builder.BuildApplication);

                // Build.
                if (GUILayout.Button(
                        new GUIContent("Build",
                                       EditorGUIUtility.FindTexture("preAudioPlayOff")), "LargeButton"))
                {
                    EditorApplication.delayCall += () => ProjectBuilderUtil.StartBuild(builder, false, false);
                }

                // Open output.
                var r = EditorGUILayout.GetControlRect(false, GUILayout.Width(15));

                if (GUI.Button(new Rect(r.x - 2, r.y + 5, 20, 20), contentOpen, EditorStyles.label))
                {
                    string outputFullPath = BuildPathUtils.GetOutputPath(builder);
                    ProjectBuilderUtil.RevealOutputInFinder(outputFullPath);
                }

                EditorGUI.EndDisabledGroup();
            }
        }
示例#2
0
        protected virtual void DrawBuilderInfo(IProjectBuilder builder)
        {
            if (builder.BuildApplication)
            {
                string productName     = builder.ProductName;
                string version         = builder.Version;
                string fullVersionCode = BuildPathUtils.GetVersionCodeLong(builder);

                string titleText = string.Format("{0} ver.{1} ({2})", productName, version, fullVersionCode);

                GUILayout.Label(
                    new GUIContent(titleText, GetBuildTargetIcon(builder)), EditorStyles.largeLabel);
            }
            else if (builder.BuildAssetBundle)
            {
                var assetBundles      = AssetDatabase.GetAllAssetBundleNames();
                int assetBundlesCount = assetBundles.Length;

                string titleText = string.Format("{0} AssetBundles", assetBundlesCount);

                GUILayout.Label(
                    new GUIContent(titleText, GetBuildTargetIcon(builder)), EditorStyles.largeLabel);
            }
        }
        public virtual void ApplyBuildVersionSettings(IProjectBuilder builder)
        {
            string versionCodeLong = BuildPathUtils.GetVersionCodeLong(builder);

            PlayerSettings.Android.bundleVersionCode = int.Parse(versionCodeLong);
        }
示例#4
0
        public virtual void ApplyBuildVersionSettings(IProjectBuilder builder)
        {
            string versionCodeLong = BuildPathUtils.GetVersionCodeLong(builder);

            PlayerSettings.iOS.buildNumber = versionCodeLong;
        }