private void DrawWarnings() { EditorGUILayout.LabelField("Warnings", EditorStyles.boldLabel); // Check Android Status if (!EstimoteUnityEditorUtils.CheckAndroidStatus()) { EditorGUILayout.Space(); GUI.color = Color.red; EditorGUILayout.HelpBox("Android setup is not complete!" + " To complete the setup go to Window/O-Mobile/Estimote Unity/Setup and follow the instructions.", MessageType.Info); GUI.color = Color.white; } // Check iOS Status if (!EstimoteUnityEditorUtils.CheckIOSStatus()) { EditorGUILayout.Space(); GUI.color = Color.red; EditorGUILayout.HelpBox("iOS setup is not complete!" + " To complete the setup go to Window/O-Mobile/Estimote Unity/Setup and follow the instructions.", MessageType.Info); GUI.color = Color.white; } // Show Button if (!EstimoteUnityEditorUtils.CheckAndroidStatus() || !EstimoteUnityEditorUtils.CheckIOSStatus()) { EditorGUILayout.Space(); if (GUILayout.Button("Open Estimote Unity Setup")) { EstimoteUnityEditorSetup.OpenWindow(); } } }
private void DrawWarnings() { bool hasWarning = !EstimoteUnityEditorUtils.CheckAndroidStatus() || !EstimoteUnityEditorUtils.CheckIOSStatus(); if (hasWarning) { GUI.color = Color.red; } if (GUILayout.Button("Warnings", EditorStyles.toolbarButton)) { mExpandWarnings = !mExpandWarnings; } GUI.color = Color.white; if (mExpandWarnings) { GUILayout.BeginVertical("box"); if (!hasWarning) { EditorGUILayout.HelpBox("No warnings to show.", MessageType.Info); } // Check Android Status if (!EstimoteUnityEditorUtils.CheckAndroidStatus()) { EditorGUILayout.Space(); GUI.color = Color.red; EditorGUILayout.HelpBox("Android setup is not complete!" + " To complete the setup go to Window/O-Mobile/Estimote Unity/Setup and follow the instructions.", MessageType.Info); GUI.color = Color.white; } // Check iOS Status if (!EstimoteUnityEditorUtils.CheckIOSStatus()) { EditorGUILayout.Space(); GUI.color = Color.red; EditorGUILayout.HelpBox("iOS setup is not complete!" + " To complete the setup go to Window/O-Mobile/Estimote Unity/Setup and follow the instructions.", MessageType.Info); GUI.color = Color.white; } // Show Button if (!EstimoteUnityEditorUtils.CheckAndroidStatus() || !EstimoteUnityEditorUtils.CheckIOSStatus()) { EditorGUILayout.Space(); if (GUILayout.Button("Open Estimote Unity Setup")) { EstimoteUnityEditorSetup.OpenWindow(); } } GUILayout.EndVertical(); } }