Beispiel #1
0
        public static void ShowWindow()
        {
            DeploymentTargetBrowser[] browserArray = (DeploymentTargetBrowser[])UnityEngine.Resources.FindObjectsOfTypeAll(typeof(DeploymentTargetBrowser));
            DeploymentTargetBrowser   browser      = (browserArray.Length <= 0) ? ScriptableObject.CreateInstance <DeploymentTargetBrowser>() : browserArray[0];

            if (browserArray.Length > 0)
            {
                browser.Focus();
            }
            else
            {
                browser.titleContent = EditorGUIUtility.TextContent("Discover Tizen Devices");
                browser.position     = new Rect(100f, 100f, 250f, 150f);
                browser.minSize      = new Vector2(browser.position.width, browser.position.height);
                browser.maxSize      = browser.minSize;
                browser.ShowUtility();
            }
        }
Beispiel #2
0
        public override void PublishSectionGUI(float h, float kLabelFloatMinW, float kLabelFloatMaxW)
        {
            EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
            EditorGUILayout.PrefixLabel(this.m_LabelDeploymentTarget, EditorStyles.miniButton);
            if (GUILayout.Button(this.m_LabelDiscover, EditorStyles.miniButton, new GUILayoutOption[0]))
            {
                DeploymentTargetBrowser window = (DeploymentTargetBrowser)EditorWindow.GetWindow(typeof(DeploymentTargetBrowser));
                window.titleContent = this.m_LabelDiscoverDevices;
                window.Show();
            }
            EditorGUILayout.EndHorizontal();
            if (PlayerSettings.Tizen.deploymentTargetType != -1)
            {
                string text = "";
                switch (PlayerSettings.Tizen.deploymentTargetType)
                {
                case 0:
                    text = this.m_LabelMobile.text + ": " + PlayerSettings.Tizen.deploymentTarget;
                    break;

                case 1:
                    text = this.m_LabelEmulator.text + ": " + PlayerSettings.Tizen.deploymentTarget;
                    break;

                case 2:
                    text = this.m_LabelAll.text;
                    break;
                }
                GUILayout.Label(text, EditorStyles.boldLabel, new GUILayoutOption[0]);
            }
            EditorGUILayout.PropertyField(this.m_TizenProductDescription, this.m_LabelDesc, new GUILayoutOption[0]);
            string stringValue = this.m_TizenProductURL.stringValue;

            EditorGUILayout.PropertyField(this.m_TizenProductURL, this.m_LabelURL, new GUILayoutOption[0]);
            PlayerSettings.Tizen.productURL = stringValue;
            string signingProfileName = PlayerSettings.Tizen.signingProfileName;

            this.m_TizenProfileName.stringValue     = EditorGUILayout.TextField(this.m_LabelProfile.text, signingProfileName, new GUILayoutOption[0]);
            PlayerSettings.Tizen.signingProfileName = signingProfileName;
            PlayerSettings.Tizen.productDescription = this.m_TizenProductDescription.stringValue;
            GUILayout.Label(this.m_LabelCapabilities, EditorStyles.boldLabel, new GUILayoutOption[0]);
            GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.MinHeight(200f) };
            this.capScrollViewPosition = GUILayout.BeginScrollView(this.capScrollViewPosition, EditorStyles.helpBox, options);
            IEnumerator enumerator = Enum.GetValues(typeof(PlayerSettings.TizenCapability)).GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    PlayerSettings.TizenCapability current = (PlayerSettings.TizenCapability)enumerator.Current;
                    GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    bool capability = PlayerSettings.Tizen.GetCapability(current);
                    GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.MinWidth(150f) };
                    bool flag = GUILayout.Toggle(capability, current.ToString(), optionArray2);
                    PlayerSettings.Tizen.SetCapability(current, flag);
                    GUILayout.EndHorizontal();
                }
            }
            finally
            {
                IDisposable disposable = enumerator as IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            GUILayout.EndScrollView();
        }