void InitializeSettings() { // Initialize settings button: if (hasSettings) { CreateSettingButton(); settingsContainer = new NodeSettingsView(); settingsContainer.visible = false; settings = new VisualElement(); // Add Node type specific settings settings.Add(CreateSettingsView()); settingsContainer.Add(settings); Add(settingsContainer); var fields = nodeTarget.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly); foreach (var field in fields) { if (field.GetCustomAttribute(typeof(SettingAttribute)) != null) { AddSettingField(field); } } } }
void InitializeSettings() { // Initialize settings button: if (hasSettings) { CreateSettingButton(); settingsContainer = new NodeSettingsView(); settingsContainer.visible = false; settingsContainer.Add(settings); Add(settingsContainer); } }
void InitializeSettings() { // Initialize settings button: if (hasSettings) { CreateSettingButton(); settingsContainer = new NodeSettingsView(); settingsContainer.visible = false; settings = new VisualElement(); // Add Node type specific settings settings.Add(CreateSettingsView()); settingsContainer.Add(settings); Add(settingsContainer); } }