@@ -59,7 +59,7 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
59
59
container . Add ( new IMGUIContainer ( ( ) => {
60
60
float newValue ;
61
61
EditorGUIUtility . labelWidth = 150 ;
62
- if ( ( FloatParameter . FloatMode ) mode . enumValueIndex == FloatParameter . FloatMode . Slider )
62
+ if ( ( FloatParameter . FloatMode ) mode . intValue == FloatParameter . FloatMode . Slider )
63
63
{
64
64
newValue = EditorGUILayout . Slider ( name . stringValue , val . floatValue , min . floatValue , max . floatValue ) ;
65
65
newValue = Mathf . Clamp ( newValue , min . floatValue , max . floatValue ) ;
@@ -94,7 +94,7 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
94
94
container . Add ( new IMGUIContainer ( ( ) => {
95
95
int newValue ;
96
96
EditorGUIUtility . labelWidth = 150 ;
97
- if ( ( IntParameter . IntMode ) mode . enumValueIndex == IntParameter . IntMode . Slider )
97
+ if ( ( IntParameter . IntMode ) mode . intValue == IntParameter . IntMode . Slider )
98
98
{
99
99
newValue = EditorGUILayout . IntSlider ( name . stringValue , val . intValue , min . intValue , max . intValue ) ;
100
100
newValue = Mathf . Clamp ( newValue , min . intValue , max . intValue ) ;
@@ -129,7 +129,7 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
129
129
container . Add ( new IMGUIContainer ( ( ) => {
130
130
EditorGUIUtility . labelWidth = 150 ;
131
131
EditorGUI . BeginChangeCheck ( ) ;
132
- if ( ( Vector2Parameter . Vector2Mode ) mode . enumValueIndex == Vector2Parameter . Vector2Mode . MinMaxSlider )
132
+ if ( ( Vector2Parameter . Vector2Mode ) mode . intValue == Vector2Parameter . Vector2Mode . MinMaxSlider )
133
133
{
134
134
float x = val . vector2Value . x ;
135
135
float y = val . vector2Value . y ;
@@ -154,7 +154,7 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
154
154
{
155
155
var name = GetNameProperty ( property ) ;
156
156
var settings = GetSettingsProperty ( property ) ;
157
- var mode = ( GradientParameter . GradientColorMode ) settings . FindPropertyRelative ( nameof ( GradientParameter . GradientSettings . mode ) ) . enumValueIndex ;
157
+ var mode = ( GradientParameter . GradientColorMode ) settings . FindPropertyRelative ( nameof ( GradientParameter . GradientSettings . mode ) ) . intValue ;
158
158
if ( mode == GradientParameter . GradientColorMode . HDR )
159
159
return new PropertyField ( property . FindPropertyRelative ( "hdrVal" ) , name . stringValue ) ;
160
160
else
@@ -170,7 +170,7 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
170
170
var name = GetNameProperty ( property ) ;
171
171
var settings = GetSettingsProperty ( property ) ;
172
172
var val = GetValProperty ( property ) ;
173
- var mode = ( ColorParameter . ColorMode ) settings . FindPropertyRelative ( nameof ( ColorParameter . ColorSettings . mode ) ) . enumValueIndex ;
173
+ var mode = ( ColorParameter . ColorMode ) settings . FindPropertyRelative ( nameof ( ColorParameter . ColorSettings . mode ) ) . intValue ;
174
174
175
175
var colorField = new ColorField ( name . stringValue ) { value = val . colorValue , hdr = mode == ColorParameter . ColorMode . HDR } ;
176
176
colorField . RegisterValueChangedCallback ( e => {
@@ -265,7 +265,7 @@ void UpdateVisibility(SerializedProperty property)
265
265
{
266
266
if ( property == null )
267
267
return ;
268
- var newValue = ( FloatParameter . FloatMode ) property . enumValueIndex ;
268
+ var newValue = ( FloatParameter . FloatMode ) property . intValue ;
269
269
270
270
if ( newValue == FloatParameter . FloatMode . Slider )
271
271
min . style . display = max . style . display = DisplayStyle . Flex ;
@@ -301,7 +301,7 @@ void UpdateVisibility(SerializedProperty property)
301
301
{
302
302
if ( property == null )
303
303
return ;
304
- var newValue = ( IntParameter . IntMode ) property . enumValueIndex ;
304
+ var newValue = ( IntParameter . IntMode ) property . intValue ;
305
305
306
306
if ( newValue == IntParameter . IntMode . Slider )
307
307
min . style . display = max . style . display = DisplayStyle . Flex ;
0 commit comments