示例#1
0
        public static void ShowArchitectureButton(BuildTargetGroup target)
        {
            bool flag;

            if (target == BuildTargetGroup.tvOS)
            {
                flag = PlayerSettings.tvOS.sdkVersion == tvOSSdkVersion.Simulator;
            }
            else
            {
                flag = PlayerSettings.iOS.sdkVersion == iOSSdkVersion.SimulatorSDK;
            }
            int scriptingBackend = (int)PlayerSettings.GetScriptingBackend(target);

            if (!flag)
            {
                int num3;
                int architecture = PlayerSettings.GetArchitecture(target);
                if (scriptingBackend == 1)
                {
                    if (target == BuildTargetGroup.tvOS)
                    {
                        num3 = 1;
                        PlayerSettingsEditor.BuildDisabledEnumPopup(new GUIContent("ARM64"), EditorGUIUtility.TextContent("Architecture"));
                    }
                    else
                    {
                        num3 = PlayerSettingsEditor.BuildEnumPopup <Architecture>(EditorGUIUtility.TextContent("Architecture"), architecture, kArchitectureOrder, kArchitectureDescriptions);
                    }
                }
                else
                {
                    num3 = 0;
                    PlayerSettingsEditor.BuildDisabledEnumPopup(new GUIContent("ARMv7"), EditorGUIUtility.TextContent("Architecture"));
                }
                if (num3 != architecture)
                {
                    PlayerSettings.SetArchitecture(target, num3);
                }
            }
            else if (scriptingBackend == 1)
            {
                PlayerSettingsEditor.BuildDisabledEnumPopup(EditorGUIUtility.TextContent("x86_64"), EditorGUIUtility.TextContent("Architecture"));
            }
            else
            {
                PlayerSettingsEditor.BuildDisabledEnumPopup(EditorGUIUtility.TextContent("i386"), EditorGUIUtility.TextContent("Architecture"));
            }
        }
示例#2
0
        private void DrawLaunchScreenGUI(LaunchScreenProperties properties, UnityEditor.iOS.DeviceType device)
        {
            PlayerSettingsEditor.BuildEnumPopup <iOSLaunchScreenType>(properties.type, EditorGUIUtility.TextContent("Launch screen type"), kLaunchScreenTypeOrder, kLaunchScreenUIDescriptions);
            iOSLaunchScreenType intValue = (iOSLaunchScreenType)properties.type.intValue;

            switch (intValue)
            {
            case iOSLaunchScreenType.ImageAndBackgroundRelative:
            case iOSLaunchScreenType.ImageAndBackgroundConstant:
                if (device == UnityEditor.iOS.DeviceType.iPhone)
                {
                    SettingsUI.Texture2DField(properties.portraitImage, EditorGUIUtility.TextContent("Portrait Image | Use only advanced type textures"));
                    SettingsUI.Texture2DField(properties.landscapeImage, EditorGUIUtility.TextContent("Landscape Image | Use only advanced type textures"));
                }
                if (device == UnityEditor.iOS.DeviceType.iPad)
                {
                    SettingsUI.Texture2DField(properties.portraitAndLandscapeImage, EditorGUIUtility.TextContent("Image | Use only advanced type textures"));
                }
                EditorGUILayout.Space();
                EditorGUILayout.PropertyField(properties.backgroundColor, EditorGUIUtility.TextContent("Background Color"), new GUILayoutOption[0]);
                if (intValue == iOSLaunchScreenType.ImageAndBackgroundConstant)
                {
                    GUIContent label = null;
                    if (device == UnityEditor.iOS.DeviceType.iPad)
                    {
                        label = EditorGUIUtility.TextContent("Size in points | Vertical in both portrait and landscape");
                    }
                    else
                    {
                        label = EditorGUIUtility.TextContent("Size in points | Horizontal in portrait, vertical in landscape");
                    }
                    EditorGUI.BeginChangeCheck();
                    EditorGUILayout.PropertyField(properties.size, label, new GUILayoutOption[0]);
                    if (EditorGUI.EndChangeCheck() && (properties.size.floatValue < 0f))
                    {
                        properties.size.floatValue = 0f;
                    }
                }
                else
                {
                    GUIContent content2 = null;
                    if (device == UnityEditor.iOS.DeviceType.iPad)
                    {
                        content2 = EditorGUIUtility.TextContent("Fill percentage | Vertical in both portrait and landscape");
                    }
                    else
                    {
                        content2 = EditorGUIUtility.TextContent("Fill percentage | Horizontal in portrait, vertical in landscape");
                    }
                    EditorGUI.BeginChangeCheck();
                    EditorGUILayout.PropertyField(properties.fillPercentage, content2, new GUILayoutOption[0]);
                    if (EditorGUI.EndChangeCheck())
                    {
                        if (properties.fillPercentage.floatValue < 1f)
                        {
                            properties.fillPercentage.floatValue = 1f;
                        }
                        else if (properties.fillPercentage.floatValue > 100f)
                        {
                            properties.fillPercentage.floatValue = 100f;
                        }
                    }
                }
                break;

            default:
                if (intValue == iOSLaunchScreenType.CustomXib)
                {
                    PlayerSettingsEditor.BuildFileBoxButton(properties.customXibPath, LocalizationDatabase.GetLocalizedString("Custom Xib"), Application.dataPath, "xib", null);
                }
                break;
            }
        }
        public override void ShowPlatformBuildOptions()
        {
            int iOSBuildConfigType = (int)EditorUserBuildSettings.iOSBuildConfigType;

            EditorUserBuildSettings.iOSBuildConfigType = (iOSBuildType)PlayerSettingsEditor.BuildEnumPopup <iOSBuildType>(EditorGUIUtility.TextContent("Run in Xcode as"), iOSBuildConfigType, kOptionsOrder, kOptionDescriptions);
        }