- Home /
Question by
iTwyx · Oct 26, 2020 at 04:15 AM ·
editor-scriptingserializationeditorwindowserializedproperty
How to modify a Gradient SerializedProperty
Hi,
In my EditorWindow, I want to modify a gradient field when I press a button. The gradient field is a SerializedProperty.
SerializedProperty gradient = serializedObject.FindProperty("gradient");
Typically with a float property I would just do property.floatValue = newValue; but in this case there is no property.gradientValue.
What's the proper way to handle this?
Thanks.
Comment
Your answer
Follow this Question
Related Questions
ApplyModifiedProperties() for UnityEvent ignores method name 0 Answers
Serializing a Transform instance in a custom inspector window 2 Answers
Dynamic serialized fields based on enum 0 Answers
OnSerialize event 2 Answers
How can I make dynamic gui based off of the variables from a serializable class? 1 Answer