Beispiel #1
0
        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 Settings window for the Project scope.
            var provider = new SettingsProvider("MagicLeap/", SettingsScope.Project)
            {
                label      = "Manifest Settings",
                guiHandler = (searchContext) =>
                {
                    var settings = MagicLeapManifestSettings.GetOrCreateSettings();
                    ManifestEditorGUI.RenderManifest(settings);
                },
                // Populate the search keywords to enable smart search filtering and label highlighting:
                keywords = new HashSet <string>(new[] { "MagicLeap", "Manifest" })
            };

            return(provider);
        }
Beispiel #2
0
        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 Settings window for the Project scope.
            var provider = new SettingsProvider("MagicLeap/", SettingsScope.Project)
            {
                label = "Manifest Settings",
                // activateHandler is called when the user clicks on the Settings item in the Settings window.
                activateHandler = (searchContext, rootElement) =>
                {
                    rootElement.Add(new ManifestEditor {
                        settingsAsset = MagicLeapManifestSettings.GetOrCreateSettings()
                    });
                },
                // Populate the search keywords to enable smart search filtering and label highlighting:
                keywords = new HashSet <string>(new[] { "Number", "Some String" })
            };

            return(provider);
        }
 void OnEnable()
 {
     rootVisualElement.Add(new ManifestEditor {
         settingsAsset = MagicLeapManifestSettings.GetOrCreateSettings()
     });
 }