Ejemplo n.º 1
0
        public override void DrawPage()
        {
            GUILayout.BeginHorizontal();
            GUILayout.Space(16);
            GUILayout.BeginVertical();
            GUILayout.Space(16);
            GUILayout.Label("Setup Experience", "AM MixerHeader2");
            GUILayout.Space(8);
            GUILayout.Label("Now we will need to generate some things to setup your project for use as a Limapp.", new GUIStyle("AM HeaderStyle")
            {
                wordWrap = true
            });

            GUILayout.Space(16);
            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();

            if (!_generating && !_generated)
            {
                if (GUILayout.Button("Setup Project", GUILayout.MaxWidth(200), GUILayout.Height(50)))
                {
                    _generating = true;
                    AppTools.GenerateScripts();
                }
            }
            else if (_generated)
            {
                using (new EditorGUI.DisabledScope(true))
                {
                    GUILayout.Button("✓ Project Setup", GUILayout.MaxWidth(200), GUILayout.Height(50));
                }
            }
            else
            {
                GUILayout.Label("Please wait while Unity creates the necessary script files...", new GUIStyle("MeTimeBlockLeft")
                {
                    wordWrap = true
                });
            }

            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
            GUILayout.EndVertical();
            GUILayout.Space(16);
            GUILayout.EndHorizontal();
            GUILayout.Space(16);
        }
        public override void Draw(BuildWindowConfig config)
        {
            GUILayout.BeginVertical("Box");
            {
                EditorGUIHelper.DrawTitle("Scene Setup");
                GUILayout.Label(
                    "In order to build for the Liminal Platform, you need to set up the app scene" +
                    "\nCurrently, we only support 1 Scene", EditorStyles.boldLabel);
                GUILayout.Space(4);
                GUILayout.Label("Setting Up", EditorStyles.boldLabel);
                var guiStyle = new GUIStyle(EditorStyles.label)
                {
                    richText = true, wordWrap = true, clipping = TextClipping.Overflow
                };
                GUILayout.Label("<b><size=17>1.</size></b> Click <b>[Generate Scripts]</b> which will provide you with methods to override basic implementation such as Pause, Resume and how the app ends.", guiStyle);
                GUILayout.Space(2);
                GUILayout.Label("<b><size=17>2.</size></b> Open the scene you want to create your experience in.", guiStyle);
                GUILayout.Space(2);
                GUILayout.Label("<b><size=17>3.</size></b> Click <b>[Setup Scene]</b> which will setup the scene to work with the Limapp system. When it comes time to build, only things under the [ExperienceApp] object will be included.", guiStyle);

                GUILayout.FlexibleSpace();

                GUILayout.BeginHorizontal();
                using (new EditorGUI.DisabledScope(_generated))
                {
                    if (GUILayout.Button("Generate Scripts"))
                    {
                        AppTools.GenerateScripts();
                    }
                }

                using (new EditorGUI.DisabledScope(!_generated))
                {
                    if (GUILayout.Button("Setup Scene"))
                    {
                        AppTools.SetupAppScene();
                    }
                }

                GUILayout.EndHorizontal();
                GUILayout.EndVertical();
            }
        }