public static SettingsProvider OnProvider() { if (propertyMap == null) { propertyMap = new StratusSerializedPropertyMap(instance); //StratusDebug.Log($"Instanced"); } // 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(projectMenuItem, SettingsScope.Project) { // By default the last token of the path is used as display name if no label is provided. label = StratusCore.menuItem, // Create the SettingsProvider and initialize its drawing (IMGUI) function in place: guiHandler = (searchContext) => { StratusPreferences settings = instance; propertyMap.DrawProperties(); }, // Populate the search keywords to enable smart search filtering and label highlighting: keywords = new HashSet <string>(new[] { StratusCore.menuItem }) }; return(provider); }
protected override void OnInitializeState() { if (instance) { properties = new StratusSerializedPropertyMap(instance, typeof(MonoBehaviour)); } OnInitializeSingletonState(); }