Skip to content

Commit 73c3d46

Browse files
Simulate headers on enum values in SlotContainerEditor (#49)
* Simulate headers on enum values in SlotContainerEditor * Update CHANGELOG.md Co-authored-by: Julien Fryer <[email protected]> # Conflicts: # com.unity.visualeffectgraph/CHANGELOG.md
1 parent 7dc834e commit 73c3d46

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

com.unity.visualeffectgraph/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ The version number for this package has increased due to a version update of a r
126126
- De-nicified attribute name (conserve case) in Set Custom Attribute title
127127
- Changed the default "No Asset" message when opening the visual effect graph window
128128
- Subgraphs are not in hardcoded categories anymore : updated default subgraph templates + Samples to add meaningful categories.
129+
- Enum fields having headers show the header in the inspector as well.
129130

130131
## [7.1.1] - 2019-09-05
131132
### Added

com.unity.visualeffectgraph/Editor/Inspector/VFXSlotContainerEditor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ public virtual void DoInspectorGUI()
9595
enumNames = values.Select(t => new GUIContent(Enum.GetName(prop.Key.FieldType, t))).ToArray();
9696
enumValues = values.ToArray();
9797

98+
HeaderAttribute attr = prop.Key.GetCustomAttributes<HeaderAttribute>().FirstOrDefault();
99+
100+
if( attr != null)
101+
GUILayout.Label( attr.header, EditorStyles.boldLabel);
102+
98103
EditorGUILayout.IntPopup(prop.Value,enumNames,enumValues );
99104
}
100105
else

0 commit comments

Comments
 (0)