Esempio n. 1
0
        void OnGUI()
        {
            GUILayout.Space(5);
            GUIStyle titleStyle = new GUIStyle(GUI.skin.label);

            titleStyle.wordWrap = true;
            EditorGUILayout.LabelField("Select an existing ARCoreSettings object or create a new one.", titleStyle);

            EditorGUI.BeginChangeCheck();
            ARCoreSettings.currentSettings =
                EditorGUILayout.ObjectField("ARCoreSettings", ARCoreSettings.currentSettings, typeof(ARCoreSettings), false) as ARCoreSettings;
            if (EditorGUI.EndChangeCheck())
            {
                ARCoreSettings.TrySelect();
            }

            GUILayout.Space(5);

            EditorGUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("Create New"))
            {
                Create();
            }

            if (GUILayout.Button("Close"))
            {
                Close();
            }

            EditorGUILayout.EndHorizontal();
        }
Esempio n. 2
0
        static void ShowSelectionWindow()
        {
            ARCoreSettings.TrySelect();
            Rect rect   = new Rect(500, 300, 400, 150);
            var  window = GetWindowWithRect <SettingsSelectionWindow>(rect);

            window.titleContent = new GUIContent("ARCore");
            window.Show();
        }