static void SelectActiveConfiguration() { var active = MadLevelConfiguration.FindActive(); if (active == null) { EditorUtility.DisplayDialog("Not Found", "No active configuration found.", "OK"); } else { // EditorGUIUtility.PingObject(active); Selection.activeObject = active; } }
void ActiveInfo() { bool assetLocationRight = IsAssetLocationRight(); GUI.enabled = assetLocationRight; var active = MadLevelConfiguration.FindActive(); if (active == configuration) { MadGUI.Info("This is the active configuration."); } else { string additional = ""; if (!assetLocationRight) { additional = " (But first you must relocate this asset. Please look at the other error.)"; } int choice = MadGUI.MessageWithButtonMulti("This configuration is not active. " + "It's not currently used to manage your scenes." + additional, MessageType.Warning, "Where is active?", "Activate"); if (choice == 0) { var currentlyActive = MadLevelConfiguration.FindActive(); if (currentlyActive != null) { EditorGUIUtility.PingObject(currentlyActive); } else { EditorUtility.DisplayDialog("Not Found", "No level configuration is active at the moment", "OK"); } } else if (choice == 1) { configuration.active = true; } } GUI.enabled = true; }