private void DrawActions(SerializedProperty property)
        {
            for (int i = 0; i < list.arraySize; i++)
            {
                SerializedProperty listEntry = list.GetArrayElementAtIndex(i);

                BuildAction buildAction = listEntry.objectReferenceValue as BuildAction;
                if (buildAction == null)
                {
                    list.DeleteArrayElementAtIndex(i);
                    --i;
                    continue;
                }

                SerializedObject serializedBuildAction = new SerializedObject(buildAction);

                EditorGUILayout.BeginHorizontal();
                bool show = listEntry.isExpanded;

                buildAction.actionEnabled = EditorGUILayout.Toggle(buildAction.actionEnabled, GUILayout.Width(15));
                EditorGUI.BeginDisabledGroup(!buildAction.actionEnabled);
                UnityBuildGUIUtility.DropdownHeader(buildAction.actionName, ref show, false,
                                                    GUILayout.ExpandWidth(true));
                EditorGUI.EndDisabledGroup();
                listEntry.isExpanded = show;

                EditorGUI.BeginDisabledGroup(i == 0);
                if (GUILayout.Button("↑↑", UnityBuildGUIUtility.helpButtonStyle))
                {
                    list.MoveArrayElement(i, 0);
                }

                if (GUILayout.Button("↑", UnityBuildGUIUtility.helpButtonStyle))
                {
                    list.MoveArrayElement(i, i - 1);
                }

                EditorGUI.EndDisabledGroup();

                EditorGUI.BeginDisabledGroup(i == list.arraySize - 1);
                if (GUILayout.Button("↓", UnityBuildGUIUtility.helpButtonStyle))
                {
                    list.MoveArrayElement(i, i + 1);
                }

                EditorGUI.EndDisabledGroup();

                if (GUILayout.Button("X", UnityBuildGUIUtility.helpButtonStyle))
                {
                    BuildAction[] buildActions;
                    buildActions = FindActionsByProperty(property);

                    // Destroy underlying object.
                    ScriptableObject.DestroyImmediate(buildActions[i], true);
                    AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(BuildSettings.instance));

                    // Remove object reference from list.
                    // TODO: Why do I need to call this twice? First call nulls reference, second one then deletes null entry.
                    list.DeleteArrayElementAtIndex(i);
                    list.DeleteArrayElementAtIndex(i);
                    show = false;
                }

                EditorGUILayout.EndHorizontal();

                if (show && buildAction.actionEnabled)
                {
                    EditorGUILayout.BeginVertical(UnityBuildGUIUtility.dropdownContentStyle);
                    buildAction.Draw(serializedBuildAction);
                    EditorGUILayout.EndVertical();
                }
            }
        }
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            showViewOptions  = property.FindPropertyRelative("showViewOptions");
            showConfigs      = property.FindPropertyRelative("showConfigs");
            showBuildInfo    = property.FindPropertyRelative("showBuildInfo");
            hideDisabled     = property.FindPropertyRelative("hideDisabled");
            treeView         = property.FindPropertyRelative("treeView");
            selectedKeyChain = property.FindPropertyRelative("selectedKeyChain");

            EditorGUI.BeginProperty(position, label, property);

            EditorGUILayout.BeginHorizontal();

            show = property.isExpanded;
            UnityBuildGUIUtility.DropdownHeader("Build Configurations", ref show, false, GUILayout.ExpandWidth(true));
            property.isExpanded = show;

            UnityBuildGUIUtility.HelpButton("Parameter-Details#build-configurations");
            EditorGUILayout.EndHorizontal();

            Color defaultBackgroundColor = GUI.backgroundColor;

            if (show)
            {
                EditorGUILayout.BeginVertical(UnityBuildGUIUtility.dropdownContentStyle);

                EditorGUILayout.BeginHorizontal();
                show = showViewOptions.isExpanded;
                UnityBuildGUIUtility.DropdownHeader("View Options", ref show, false, GUILayout.ExpandWidth(true));
                showViewOptions.isExpanded = show;
                EditorGUILayout.EndHorizontal();

                if (show)
                {
                    EditorGUILayout.BeginVertical(UnityBuildGUIUtility.dropdownContentStyle);

                    hideDisabled.boolValue = EditorGUILayout.ToggleLeft("Hide disabled configurations", hideDisabled.boolValue);
                    treeView.boolValue     = EditorGUILayout.ToggleLeft("Show full configurations tree", treeView.boolValue);

                    EditorGUILayout.EndVertical();
                }

                GUILayout.Space(5);
                EditorGUILayout.BeginHorizontal();
                show = showConfigs.isExpanded;
                UnityBuildGUIUtility.DropdownHeader("Configurations", ref show, false, GUILayout.ExpandWidth(true));
                showConfigs.isExpanded = show;
                EditorGUILayout.EndHorizontal();

                if (show)
                {
                    EditorGUILayout.BeginVertical(UnityBuildGUIUtility.dropdownContentStyle);

                    if (BuildSettings.projectConfigurations.configSet.Keys.Count > 0)
                    {
                        BuildReleaseType[] releaseTypes = BuildSettings.releaseTypeList.releaseTypes;
                        for (int i = 0; i < releaseTypes.Length; i++)
                        {
                            string        key    = releaseTypes[i].typeName;
                            Configuration config = BuildSettings.projectConfigurations.configSet[key];
                            DisplayConfigTree(key, config, 0);
                        }
                    }
                    else
                    {
                        EditorGUILayout.HelpBox("No Configuration info. Please add a Release Type.", MessageType.Error);
                    }


                    EditorGUILayout.EndVertical();
                }

                GUILayout.Space(5);
                EditorGUILayout.BeginHorizontal();
                show = showBuildInfo.isExpanded;
                UnityBuildGUIUtility.DropdownHeader("Build Info", ref show, false, GUILayout.ExpandWidth(true));
                showBuildInfo.isExpanded = show;
                EditorGUILayout.EndHorizontal();

                if (show)
                {
                    EditorGUILayout.BeginVertical(UnityBuildGUIUtility.dropdownContentStyle);

                    if (string.IsNullOrEmpty(selectedKeyChain.stringValue))
                    {
                        EditorGUILayout.HelpBox("Click a build configuration above in \"Configurations\" to view full details.", MessageType.Info);
                    }
                    else
                    {
                        BuildReleaseType  releaseType;
                        BuildPlatform     platform;
                        BuildArchitecture arch;
                        BuildDistribution dist;
                        BuildOptions      buildOptions = BuildOptions.None;

                        bool parseSuccess = BuildSettings.projectConfigurations.ParseKeychain(selectedKeyChain.stringValue, out releaseType, out platform, out arch, out dist);

                        if (parseSuccess)
                        {
                            string defines = BuildProject.GenerateDefaultDefines(releaseType, platform, arch, dist);

                            EditorGUILayout.LabelField("Misc Info", UnityBuildGUIUtility.midHeaderStyle);
                            EditorGUILayout.LabelField("Defines:");
                            EditorGUILayout.LabelField(defines, EditorStyles.wordWrappedLabel);

                            if (releaseType != null)
                            {
                                buildOptions = releaseType.buildOptions;
                                EditorGUILayout.LabelField("Release Type", UnityBuildGUIUtility.midHeaderStyle);
                                EditorGUILayout.LabelField("Type Name:\t" + releaseType.typeName);

                                if (!string.IsNullOrEmpty(releaseType.bundleIdentifier))
                                {
                                    EditorGUILayout.LabelField("Bundle Identifier:\t" + releaseType.bundleIdentifier);
                                }

                                EditorGUILayout.LabelField("Product Name:\t" + releaseType.productName);
                            }

                            if (platform != null)
                            {
                                EditorGUILayout.LabelField("Platform", UnityBuildGUIUtility.midHeaderStyle);
                                EditorGUILayout.LabelField("Name:\t\t" + platform.platformName);
                            }

                            if (arch != null)
                            {
                                EditorGUILayout.LabelField("Architecture", UnityBuildGUIUtility.midHeaderStyle);
                                EditorGUILayout.LabelField("Name:\t\t" + arch.name);
                            }

                            if (dist != null)
                            {
                                EditorGUILayout.LabelField("Distribution", UnityBuildGUIUtility.midHeaderStyle);
                                EditorGUILayout.LabelField("Name:\t\t" + dist.distributionName);
                            }

                            GUILayout.Space(20);
                            GUI.backgroundColor = Color.green;
                            if (GUILayout.Button("Build", GUILayout.ExpandWidth(true)))
                            {
                                BuildOptions finalBuildOptions = buildOptions;
                                EditorApplication.delayCall += () =>
                                                               BuildProject.BuildSingle(selectedKeyChain.stringValue, finalBuildOptions);
                            }
                            if (GUILayout.Button("Build and Run", GUILayout.ExpandWidth(true)))
                            {
                                buildOptions |= BuildOptions.AutoRunPlayer;
                                BuildOptions finalBuildOptions = buildOptions;
                                EditorApplication.delayCall += () =>
                                                               BuildProject.BuildSingle(selectedKeyChain.stringValue, finalBuildOptions);
                            }

                            EditorGUI.BeginDisabledGroup((buildOptions & BuildOptions.Development) != BuildOptions.Development);
                            if (GUILayout.Button("Build and Run w/ Profiler", GUILayout.ExpandWidth(true)))
                            {
                                buildOptions |= BuildOptions.AutoRunPlayer;
                                buildOptions |= BuildOptions.ConnectWithProfiler;
                                BuildOptions finalBuildOptions = buildOptions;
                                EditorApplication.delayCall += () =>
                                                               BuildProject.BuildSingle(selectedKeyChain.stringValue, finalBuildOptions);
                            }
                            EditorGUI.EndDisabledGroup();
                            GUI.backgroundColor = defaultBackgroundColor;

                            if (GUILayout.Button("Refresh BuildConstants and Apply Defines", GUILayout.ExpandWidth(true)))
                            {
                            #if UNITY_5_6_OR_NEWER
                                EditorUserBuildSettings.SwitchActiveBuildTarget(platform.targetGroup, arch.target);
                            #else
                                EditorUserBuildSettings.SwitchActiveBuildTarget(arch.target);
                            #endif

                                string currentDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(platform.targetGroup);
                                string appliedDefines = BuildProject.MergeDefines(currentDefines, defines);
                                PlayerSettings.SetScriptingDefineSymbolsForGroup(platform.targetGroup, appliedDefines);

                                BuildConstantsGenerator.Generate(DateTime.Now, BuildSettings.productParameters.lastGeneratedVersion, releaseType, platform, arch, dist);
                            }
                        }
                        else
                        {
                            EditorGUILayout.HelpBox("Could not parse selected configuration. It may no longer be valid due to a changes. Select again.", MessageType.Info);
                        }
                    }

                    EditorGUILayout.EndVertical();
                }

                property.serializedObject.ApplyModifiedProperties();

                EditorGUILayout.EndVertical();
            }

            EditorGUI.EndProperty();
        }
Exemple #3
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(position, label, property);

            // Limit valid characters.
            // TODO: This might not be necessary since name will need to be sanitized for different needs later (as an enum entry, pre-processor define, etc.)
            //char chr = Event.current.character;
            //if ((chr < 'a' || chr > 'z') && (chr < 'A' || chr > 'Z') && (chr < '0' || chr > '9') && chr != '-' && chr != '_' && chr != ' ')
            //{
            //    Event.current.character = '\0';
            //}

            bool show = property.isExpanded;

            UnityBuildGUIUtility.DropdownHeader(property.FindPropertyRelative("typeName").stringValue, ref show, false);
            property.isExpanded = show;

            if (show)
            {
                EditorGUILayout.BeginVertical(UnityBuildGUIUtility.dropdownContentStyle);

                GUILayout.Label("Basic Info", UnityBuildGUIUtility.midHeaderStyle);

                SerializedProperty typeName = property.FindPropertyRelative("typeName");

                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.PrefixLabel("Type Name");
                typeName.stringValue = BuildProject.SanitizeFolderName(GUILayout.TextArea(typeName.stringValue));
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.PropertyField(property.FindPropertyRelative("bundleIdentifier"));
                EditorGUILayout.PropertyField(property.FindPropertyRelative("productName"));
                EditorGUILayout.PropertyField(property.FindPropertyRelative("companyName"));

                GUILayout.Space(20);
                GUILayout.Label("Build Options", UnityBuildGUIUtility.midHeaderStyle);

                EditorGUILayout.PropertyField(property.FindPropertyRelative("customDefines"));

                SerializedProperty buildOptions = property.FindPropertyRelative("buildOptions");

                bool enableHeadlessMode = ((BuildOptions)buildOptions.intValue & BuildOptions.EnableHeadlessMode) == BuildOptions.EnableHeadlessMode;
                bool developmentBuild   = ((BuildOptions)buildOptions.intValue & BuildOptions.Development) == BuildOptions.Development;
                bool allowDebugging     = ((BuildOptions)buildOptions.intValue & BuildOptions.AllowDebugging) == BuildOptions.AllowDebugging;

                enableHeadlessMode = EditorGUILayout.ToggleLeft(" Server Build", enableHeadlessMode);
                if (enableHeadlessMode)
                {
                    buildOptions.intValue |= (int)BuildOptions.EnableHeadlessMode;
                }
                else
                {
                    buildOptions.intValue &= ~(int)BuildOptions.EnableHeadlessMode;
                }

                developmentBuild = EditorGUILayout.ToggleLeft(" Development Build", developmentBuild);
                if (developmentBuild)
                {
                    buildOptions.intValue |= (int)BuildOptions.Development;
                }
                else
                {
                    buildOptions.intValue &= ~(int)BuildOptions.Development;
                }

                EditorGUI.BeginDisabledGroup(!developmentBuild);
                allowDebugging = EditorGUILayout.ToggleLeft(" Script Debugging", allowDebugging);
                EditorGUI.EndDisabledGroup();
                if (allowDebugging)
                {
                    buildOptions.intValue |= (int)BuildOptions.AllowDebugging;
                }
                else
                {
                    buildOptions.intValue &= ~(int)BuildOptions.AllowDebugging;
                }

                buildOptions.intValue = (int)(BuildOptions)EditorGUILayout.EnumFlagsField("Advanced", (BuildOptions)buildOptions.intValue);

                EditorGUILayout.PropertyField(property.FindPropertyRelative("sceneList"));

                GUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Delete", GUILayout.MaxWidth(150)))
                {
                    BuildReleaseType[] types = BuildSettings.releaseTypeList.releaseTypes;
                    for (int i = 0; i < types.Length; i++)
                    {
                        if (types[i].typeName == property.FindPropertyRelative("typeName").stringValue)
                        {
                            ArrayUtility.RemoveAt <BuildReleaseType>(ref BuildSettings.releaseTypeList.releaseTypes, i);
                            GUIUtility.keyboardControl = 0;
                            break;
                        }
                    }
                }
                GUILayout.FlexibleSpace();
                GUILayout.EndHorizontal();

                property.serializedObject.ApplyModifiedProperties();

                EditorGUILayout.EndVertical();
            }

            EditorGUI.EndProperty();
        }
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(position, label, property);

            EditorGUILayout.BeginHorizontal();

            bool show = property.isExpanded;

            UnityBuildGUIUtility.DropdownHeader("SceneList", ref show, false, GUILayout.ExpandWidth(true));
            property.isExpanded = show;

            EditorGUILayout.EndHorizontal();

            //Refresh all scene lists.
            for (int i = 0; i < BuildSettings.releaseTypeList.releaseTypes.Length; i++)
            {
                BuildReleaseType rt = BuildSettings.releaseTypeList.releaseTypes[i];
                rt.sceneList.Refresh();
            }

            list = property.FindPropertyRelative("enabledScenes");

            if (show)
            {
                EditorGUILayout.BeginVertical(UnityBuildGUIUtility.dropdownContentStyle);

                SerializedProperty platformProperty;
                string             fileGUID;
                string             filePath;
                string             sceneName = "N/A";
                if (list.arraySize > 0)
                {
                    platformProperty = list.GetArrayElementAtIndex(0);
                    fileGUID         = platformProperty.FindPropertyRelative("fileGUID").stringValue;
                    filePath         = AssetDatabase.GUIDToAssetPath(fileGUID);
                    sceneName        = Path.GetFileNameWithoutExtension(filePath);
                }

                EditorGUILayout.BeginHorizontal();

                show = list.isExpanded;
                UnityBuildGUIUtility.DropdownHeader(string.Format("Scenes ({0}) (First Scene: {1})", list.arraySize, sceneName), ref show, false, GUILayout.ExpandWidth(true));
                list.isExpanded = show;

                EditorGUILayout.EndHorizontal();

                if (show)
                {
                    for (int i = 0; i < list.arraySize; i++)
                    {
                        platformProperty = list.GetArrayElementAtIndex(i);
                        fileGUID         = platformProperty.FindPropertyRelative("fileGUID").stringValue;
                        filePath         = AssetDatabase.GUIDToAssetPath(fileGUID);
                        sceneName        = Path.GetFileNameWithoutExtension(filePath);

                        EditorGUILayout.BeginHorizontal();
                        EditorGUILayout.TextArea(sceneName + " (" + filePath + ")");

                        EditorGUI.BeginDisabledGroup(i == 0);
                        if (GUILayout.Button("↑↑", UnityBuildGUIUtility.helpButtonStyle))
                        {
                            list.MoveArrayElement(i, 0);
                        }
                        if (GUILayout.Button("↑", UnityBuildGUIUtility.helpButtonStyle))
                        {
                            list.MoveArrayElement(i, i - 1);
                        }
                        EditorGUI.EndDisabledGroup();

                        EditorGUI.BeginDisabledGroup(i == list.arraySize - 1);
                        if (GUILayout.Button("↓", UnityBuildGUIUtility.helpButtonStyle))
                        {
                            list.MoveArrayElement(i, i + 1);
                        }
                        EditorGUI.EndDisabledGroup();

                        if (GUILayout.Button("X", UnityBuildGUIUtility.helpButtonStyle))
                        {
                            list.DeleteArrayElementAtIndex(i);
                        }

                        property.serializedObject.ApplyModifiedProperties();

                        EditorGUILayout.EndHorizontal();
                    }
                }

                GUILayout.Space(20);

                Rect dropArea = GUILayoutUtility.GetRect(0, 50.0f, GUILayout.ExpandWidth(true));
                GUI.Box(dropArea, "Drag and Drop scene files here to add to list.", UnityBuildGUIUtility.dragDropStyle);
                Event currentEvent = Event.current;

                switch (currentEvent.type)
                {
                case EventType.DragUpdated:
                case EventType.DragPerform:
                    if (dropArea.Contains(currentEvent.mousePosition))
                    {
                        DragAndDrop.visualMode = DragAndDropVisualMode.Copy;
                        if (currentEvent.type == EventType.DragPerform)
                        {
                            DragAndDrop.AcceptDrag();

                            foreach (Object obj in DragAndDrop.objectReferences)
                            {
                                if (obj.GetType() == typeof(UnityEditor.SceneAsset))
                                {
                                    string objFilepath = AssetDatabase.GetAssetPath(obj);
                                    string objGUID     = AssetDatabase.AssetPathToGUID(objFilepath);
                                    AddScene(objGUID);
                                }
                            }

                            if (list.arraySize >= AUTO_COLLAPSE_SIZE)
                            {
                                list.isExpanded = false;
                            }
                        }
                    }
                    break;
                }

                if (GUILayout.Button("Clear Scene List", GUILayout.ExpandWidth(true)))
                {
                    list.ClearArray();
                }

                if (GUILayout.Button("Add Scene File Directory", GUILayout.ExpandWidth(true)))
                {
                    GetSceneFileDirectory("Add Scene Files");
                }

                if (GUILayout.Button("Set First Scene by File", GUILayout.ExpandWidth(true)))
                {
                    SetFirstSceneByFile();
                }

                list.serializedObject.ApplyModifiedProperties();
                property.serializedObject.ApplyModifiedProperties();

                EditorGUILayout.EndVertical();
            }

            EditorGUI.EndProperty();
        }
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(position, GUIContent.none, property);

            bool show = property.isExpanded;

            UnityBuildGUIUtility.DropdownHeader(property.FindPropertyRelative("platformName").stringValue, ref show, false);
            property.isExpanded = show;

            if (show)
            {
                EditorGUILayout.BeginVertical(UnityBuildGUIUtility.dropdownContentStyle);

                SerializedProperty archList = property.FindPropertyRelative("architectures");

                if (archList.arraySize > 1)
                {
                    GUILayout.Label("Architectures", UnityBuildGUIUtility.midHeaderStyle);
                    for (int i = 0; i < archList.arraySize; i++)
                    {
                        SerializedProperty archProperty = archList.GetArrayElementAtIndex(i);
                        SerializedProperty archName     = archProperty.FindPropertyRelative("name");
                        SerializedProperty archEnabled  = archProperty.FindPropertyRelative("enabled");

                        archEnabled.boolValue = GUILayout.Toggle(archEnabled.boolValue, archName.stringValue);
                        archProperty.serializedObject.ApplyModifiedProperties();
                    }
                }

                SerializedProperty distList = property.FindPropertyRelative("distributionList.distributions");

                if (distList.arraySize > 0)
                {
                    GUILayout.Space(20);
                    GUILayout.Label("Distributions", UnityBuildGUIUtility.midHeaderStyle);

                    for (int i = 0; i < distList.arraySize; i++)
                    {
                        SerializedProperty dist        = distList.GetArrayElementAtIndex(i);
                        SerializedProperty distEnabled = dist.FindPropertyRelative("enabled");
                        SerializedProperty distName    = dist.FindPropertyRelative("distributionName");

                        GUILayout.BeginHorizontal();

                        distEnabled.boolValue = GUILayout.Toggle(distEnabled.boolValue, GUIContent.none, GUILayout.ExpandWidth(false));
                        distName.stringValue  = BuildProject.SanitizeFolderName(GUILayout.TextField(distName.stringValue));

                        if (GUILayout.Button("X", UnityBuildGUIUtility.helpButtonStyle))
                        {
                            distList.DeleteArrayElementAtIndex(i);
                        }

                        dist.serializedObject.ApplyModifiedProperties();

                        GUILayout.EndHorizontal();
                    }
                }

                GUILayout.Space(10);
                GUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                GUILayout.BeginVertical();
                if (GUILayout.Button("Add Distribution", GUILayout.MaxWidth(150)))
                {
                    int addedIndex = distList.arraySize;
                    distList.InsertArrayElementAtIndex(addedIndex);

                    SerializedProperty addedProperty = distList.GetArrayElementAtIndex(addedIndex);
                    addedProperty.FindPropertyRelative("enabled").boolValue            = true;
                    addedProperty.FindPropertyRelative("distributionName").stringValue = "DistributionName";

                    addedProperty.serializedObject.ApplyModifiedProperties();
                    distList.serializedObject.ApplyModifiedProperties();
                    property.serializedObject.ApplyModifiedProperties();
                    GUIUtility.keyboardControl = 0;
                }
                if (GUILayout.Button("Delete", GUILayout.MaxWidth(150)))
                {
                    property.FindPropertyRelative("enabled").boolValue = false;
                }
                GUILayout.EndVertical();
                GUILayout.FlexibleSpace();
                GUILayout.EndHorizontal();

                EditorGUILayout.EndVertical();
            }

            property.serializedObject.ApplyModifiedProperties();

            EditorGUI.EndProperty();
        }
Exemple #6
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(position, label, property);

            // Limit valid characters.
            // TODO: This might not be necessary since name will need to be sanitized for different needs later (as an enum entry, pre-processor define, etc.)
            //char chr = Event.current.character;
            //if ((chr < 'a' || chr > 'z') && (chr < 'A' || chr > 'Z') && (chr < '0' || chr > '9') && chr != '-' && chr != '_' && chr != ' ')
            //{
            //    Event.current.character = '\0';
            //}

            bool show = property.isExpanded;

            UnityBuildGUIUtility.DropdownHeader(property.FindPropertyRelative("typeName").stringValue, ref show, false);
            property.isExpanded = show;

            if (show)
            {
                EditorGUILayout.BeginVertical(UnityBuildGUIUtility.dropdownContentStyle);

                GUILayout.Label("Basic Info", UnityBuildGUIUtility.midHeaderStyle);

                SerializedProperty typeName = property.FindPropertyRelative("typeName");

                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.PrefixLabel("Type Name");
                typeName.stringValue = BuildProject.SanitizeFolderName(GUILayout.TextArea(typeName.stringValue));
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.PropertyField(property.FindPropertyRelative("bundleIndentifier"));
                EditorGUILayout.PropertyField(property.FindPropertyRelative("productName"));
                EditorGUILayout.PropertyField(property.FindPropertyRelative("companyName"));

                GUILayout.Space(20);
                GUILayout.Label("Build Options", UnityBuildGUIUtility.midHeaderStyle);

                EditorGUILayout.PropertyField(property.FindPropertyRelative("customDefines"));

                SerializedProperty developmentBuild   = property.FindPropertyRelative("developmentBuild");
                SerializedProperty allowDebugging     = property.FindPropertyRelative("allowDebugging");
                SerializedProperty enableHeadlessMode = property.FindPropertyRelative("enableHeadlessMode");
                SerializedProperty enableVR           = property.FindPropertyRelative("virtualRealitySupported");
                SerializedProperty supportedSDKs      = property.FindPropertyRelative("virtualRealitySDKs");

                if (vrSDKLists == null)
                {
                    vrSDKLists = new Dictionary <string, ReorderableList>();
                }

                ReorderableList vrSDKList;
                if (!vrSDKLists.TryGetValue(property.propertyPath, out vrSDKList))
                {
                    vrSDKList = CreateVRSDKList(supportedSDKs);
                    vrSDKLists.Add(property.propertyPath, vrSDKList);
                }

                EditorGUI.BeginDisabledGroup(enableHeadlessMode.boolValue);
                developmentBuild.boolValue = EditorGUILayout.ToggleLeft(" Development Build", developmentBuild.boolValue);
                EditorGUI.EndDisabledGroup();

                EditorGUI.BeginDisabledGroup(!developmentBuild.boolValue);
                allowDebugging.boolValue = EditorGUILayout.ToggleLeft(" Script Debugging", allowDebugging.boolValue);
                EditorGUI.EndDisabledGroup();

                EditorGUI.BeginDisabledGroup(developmentBuild.boolValue);
                enableHeadlessMode.boolValue = EditorGUILayout.ToggleLeft(" Headless Mode", enableHeadlessMode.boolValue);
                EditorGUI.EndDisabledGroup();

                enableVR.boolValue = EditorGUILayout.ToggleLeft(" Virtual Reality Supported", enableVR.boolValue);
                if (enableVR.boolValue)
                {
                    vrSDKList.DoLayoutList();
                }

                EditorGUILayout.PropertyField(property.FindPropertyRelative("sceneList"));

                GUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Delete", GUILayout.MaxWidth(150)))
                {
                    BuildReleaseType[] types = BuildSettings.releaseTypeList.releaseTypes;
                    for (int i = 0; i < types.Length; i++)
                    {
                        if (types[i].typeName == property.FindPropertyRelative("typeName").stringValue)
                        {
                            ArrayUtility.RemoveAt <BuildReleaseType>(ref BuildSettings.releaseTypeList.releaseTypes, i);
                            GUIUtility.keyboardControl = 0;
                            break;
                        }
                    }
                }
                GUILayout.FlexibleSpace();
                GUILayout.EndHorizontal();

                property.serializedObject.ApplyModifiedProperties();

                EditorGUILayout.EndVertical();
            }

            EditorGUI.EndProperty();
        }