Refresh Curve Field Previews

I have a custom editor that makes a couple of calls to EditorGUILayout.CurveField. There’s also a button that, when pressed, makes some adjustments to the curves. However, after it’s pressed, the curve previews still show the unadjusted curves. If the user clicks on the curve field, the editor window pops up and shows that the curves really have been changed (Although the preview still won’t update until the user actually changes something about the curve).

Is there any way to force the curve fields to refresh their previews?

1 Answer

1

To answer my own question, if you replace the curve with a new curve (rather than setting the old curve’s keys property), the preview will update.

Same issue thanks!, but this seems to be like a unity bug?