/// <summary> /// Displays a GUI enabling the user to see the current package settings. /// Intentionally, this interface cannot be used to modify these settings. /// </summary> public override void OnInspectorGUI() { // Start the GUI. GeneralToolkit.EditorStart(serializedObject, _targetObject); // Indicate how to modify these settings. EditorGUILayout.Space(); EditorGUILayout.LabelField("The settings below can be modified from the Project Settings window.", GeneralToolkit.wordWrapStyle); EditorGUILayout.Space(); // Disable the GUI. bool isGUIEnabled = GUI.enabled; GUI.enabled = false; // Enable the user to see the package's settings. COLIBRIVRSettings.SectionPackageSettings(_targetObject); // End the GUI. GUI.enabled = isGUIEnabled; GeneralToolkit.EditorEnd(serializedObject); }
public static SettingsProvider CreateSettingsProvider() { // First parameter is the path in the Settings window. // Second parameter is the scope of this setting: it only appears in the Project Settings window. SettingsProvider provider = new SettingsProvider("Project/COLIBRIVRSettings", SettingsScope.Project) { // By default the last token of the path is used as display name if no label is provided. label = "COLIBRI VR", // Create the SettingsProvider and initialize its drawing (IMGUI) function in place: guiHandler = (searchContext) => { COLIBRIVRSettings packageSettings = COLIBRIVRSettings.packageSettings; COLIBRIVRSettings.SectionPackageSettings(packageSettings); }, // Populate the search keywords to enable smart search filtering and label highlighting: keywords = new HashSet <string>(new[] { "COLIBRI VR", "COLMAP", "Blender", "Instant Meshes" }) }; return(provider); }