private static SettingsProvider BoltExSettingsProvider() { var provider = new SettingsProvider("Preferences/BoltEx", SettingsScope.User) { label = "BoltEx", guiHandler = (searchContext) => { if (EditorApplication.isCompiling) { LudiqGUI.CenterLoader(); return; } instance.configurationPanel.PreferenceItem(); } }; return(provider); }
public override void OnGUI() { if (EditorApplication.isCompiling) { LudiqGUI.CenterLoader(); return; } using (LudiqEditorUtility.editedObject.Override(serializedObject.targetObject)) { if (PluginContainer.anyVersionMismatch) { LudiqGUI.VersionMismatchShieldLayout(); return; } if (inspector == null) { inspector = metadata.Editor(); } EditorGUI.BeginChangeCheck(); LudiqGUI.Space(EditorGUIUtility.standardVerticalSpacing); inspector.DrawLayout(GUIContent.none, 20); if (EditorGUI.EndChangeCheck()) { editorParent.Repaint(); } if (LudiqCore.Configuration.developerMode) { debugFoldout = EditorGUILayout.Foldout(debugFoldout, "Developer", true); if (debugFoldout) { var target = serializedObject.targetObject; if (GUILayout.Button("Show Serialized Data")) { ((SerializationData)dataProperty.GetUnderlyingValue()).ShowString(target.ToString()); } EditorGUI.BeginDisabledGroup(true); EditorGUILayout.PropertyField(dataProperty.FindPropertyRelativeOrFail("_" + nameof(SerializationData.objectReferences))); EditorGUILayout.Toggle("Prefab definition", target.IsPrefabDefinition()); EditorGUILayout.Toggle("Prefab instance", target.IsPrefabInstance()); EditorGUILayout.Toggle("Connected prefab instance", target.IsConnectedPrefabInstance()); EditorGUILayout.Toggle("Disconnected prefab instance", target.IsDisconnectedPrefabInstance()); EditorGUILayout.Toggle("Scene bound", target.IsSceneBound()); EditorGUILayout.ObjectField("Prefab definition", target.GetPrefabDefinition(), typeof(UnityEngine.Object), true); EditorGUI.EndDisabledGroup(); } } else { LudiqGUI.Space(EditorGUIUtility.standardVerticalSpacing); } } }