// Render all properties for a section. public bool RenderSection(string sectionKey, params string[] ignoreGroups) { ProfileGroupSection sectionInfo = m_Profile.GetSectionInfo(sectionKey); RenderSectionTitle(sectionInfo.sectionTitle, sectionInfo.sectionIcon); bool didChangeProfile = false; // Render all the feature checkboxes for the section. if (m_Sections.ContainsKey(sectionKey)) { ProfileFeatureSection keywordSection = m_Sections[sectionKey]; foreach (ProfileFeatureDefinition def in keywordSection.featureDefinitions) { // Check for keyword dependencies. if (def.dependsOnFeature != null) { if (m_Profile.IsFeatureEnabled(def.dependsOnFeature) != def.dependsOnValue) { continue; } } // Render the feature UI. bool valueChanged = false; if (def.featureType == ProfileFeatureDefinition.FeatureType.BooleanValue || def.featureType == ProfileFeatureDefinition.FeatureType.ShaderKeyword) { RenderFeatureCheckbox( def, m_Profile.IsFeatureEnabled(def.featureKey), out valueChanged); } else if (def.featureType == ProfileFeatureDefinition.FeatureType.ShaderKeywordDropdown) { RenderDropdownShaderFeature( def, out valueChanged); } if (valueChanged) { didChangeProfile = true; } } } // Render all the property groups for this section. foreach (ProfileGroupDefinition groupInfo in sectionInfo.groups) { bool shouldIgnore = false; foreach (string ignoreName in ignoreGroups) { if (groupInfo.groupName.Contains(ignoreName)) { shouldIgnore = true; break; } } if (shouldIgnore) { continue; } bool valueChanged = RenderProfileGroup(groupInfo); if (valueChanged) { didChangeProfile = true; } } // Render any section specific non-timeline properties. if (sectionKey == ProfileSectionKeys.LightningSectionKey) { EditorGUILayout.ObjectField(serializedObject.FindProperty("lightningArtSet")); } else if (sectionKey == ProfileSectionKeys.RainSplashSectionKey) { EditorGUILayout.ObjectField(serializedObject.FindProperty("rainSplashArtSet")); } return(didChangeProfile); }