static void Init() { EasyMotionToggleSetupWindow window = (EasyMotionToggleSetupWindow)EditorWindow.GetWindow(typeof(EasyMotionToggleSetupWindow)); window.Show(); window.titleContent = new GUIContent("Toggle Setup", "Select the toggle which will enable the player to enable or disable the motion platform."); window.minSize = new Vector2(300, 400); window.maxSize = new Vector2(300, 900); }
private void DrawToggleStep() { DrawLogoBox(); EditorGUILayout.Space(); EditorGUILayout.LabelField("1/3 Platform On-Off Toggle Reference", GetWelcomeStyle()); EditorGUILayout.LabelField("\nEasyMotion will only collect and generate motion data if a player enables the platform within a settings menu.\n\nSelect the toggle you wish to use to allow the player to do so.", GetTextAreaStyle()); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.LabelField("1. Platform On/Off Toggle Reference", GetListItemStyle(FontStyle.Bold, Color.black)); EditorGUILayout.LabelField("2. Serial Port COM Dropdown Reference", GetListItemStyle(FontStyle.Normal, Color.grey)); EditorGUILayout.LabelField("3. Force Slider References (Optional)", GetListItemStyle(FontStyle.Bold, Color.grey)); EditorGUILayout.LabelField("4. Rigidbody Reference (Final)", GetListItemStyle(FontStyle.Bold, Color.grey)); GUILayout.FlexibleSpace(); if (FoundToggleController()) { EditorGUILayout.HelpBox("Toggle was previously assigned. You can reset this through EasyMotion > In-Game References > On-Off Toggle Setup", MessageType.Info, true); } EditorGUILayout.BeginHorizontal(GetButtonStyle()); if (FoundToggleController()) { if (GUILayout.Button("Next >", skin.button)) { beginSerialPortStep = true; } } else { if (GUILayout.Button("Select Toggle", skin.button)) { beginSerialPortStep = true; if (!FoundToggleController()) { EasyMotionToggleSetupWindow window = GetWindow <EasyMotionToggleSetupWindow>(typeof(EasyMotionInitialSetup)); window.ShowAuxWindow(); window.titleContent = new GUIContent("Toggle Setup", "Select the toggle which will enable the player to enable or disable the motion platform."); window.minSize = new Vector2(300, 400); window.maxSize = new Vector2(300, 900); } } } if (GUILayout.Button("Cancel", skin.button)) { if (EditorUtility.DisplayDialog("EasyMotion - Configuration Wizard", "\n\nExit Wizard?", "Ok", "Cancel")) { this.Close(); } } EditorGUILayout.EndHorizontal(); }