OnValueChanged Does Not Repaint Game or Scene View

Issue #348 wontfix
Former user created an issue

The OnValueChanged attribute will successfully call a method, however Odin Inspector will not repaint the scene or game view afterwards. We have to click on or resize the editor windows to cause a refresh to occur.

To reproduce, create a string and set it's OnValueChanged attribute to a method that will update the visual component of a Unity UI text component to the latest text.

You can see that the OnValueChanged method is being called, but the Unity Editor Scene & Game view are always one update behind, and for some other field types (such as color), you will never see the Scene or Game view update.

Using Unity 2017.4.1f1 and Odin

Editor only mode is not enabled.

Experienced on a Windows 10 home edition PC.

To discuss further or request an example project, contact me at derrickbarra@brandvr.co.

Comments (1)

  1. Tor Esa Vestergaard

    Odin only triggers a repaint of the window in which the OnValueChanged invoke was run, nothing more. Odin cannot know what has to be updated after such a call, as completely arbitrary code can run in it.

    And, I'm sorry, but nor do I think Odin should request a repaint of literally everything, everywhere, every time it invokes a method that might change things. It is far more reliable and sensible, if instead, when you yourself are triggering a change that needs such an update outside the scope of the current window, then you yourself force the repaint of the necessary elements.

  2. Log in to comment