Пример #1
0
        public static SettingsProvider CreateMyCustomSettingsProvider()
        {
            if (!IsSettingsAvailable())
            {
                MVSettings.GetSettingsInEditor();
            }
            if (IsSettingsAvailable())
            {
                var provider = new MVSettingsProvider("Project/MVSettingsProvider", SettingsScope.Project);

                // Automatically extract all keywords from the Styles.
                provider.keywords = GetSearchKeywordsFromGUIContentProperties <Styles>();
                return(provider);
            }

            // Settings Asset doesn't exist yet; no need to display anything in the Settings window.
            return(null);
        }
Пример #2
0
 public override void OnActivate(string searchContext, VisualElement rootElement)
 {
     // This function is called when the user clicks on the MyCustom element in the Settings window.
     m_CustomSettings = new SerializedObject(MVSettings.GetSettingsInEditor());
 }