Add IMGUI Container element change event

Untiy Ver:2020.2.0a16

no change event of imgui element found in ui elemnt.
When the value of the IMGUI element has changed, I need to know that the IMGUI element has changed to do further

I temporarily added a callback to solve the problem, but I don’t know which element has changed and whether the value has changed.

6089838--661395--upload_2020-7-15_0-39-3.png

I don’t know if I can provide a GUIValueChangeEvent, it probably contains GuiLabel, newValue. Or make SerializedPropertyChangeEvent support

It’s been a commonly requested feature but it’s technically infeasible for us to implement in a generic way. ChangeEvents in UI Toolkit need to come from an actual UI Toolkit VisualElement and have a well defined propagation path in a VisualElement heirarchy.

IMGUIContainer is seen as a single black box VisualElement by UI Toolkit and anything can happen inside. You could track your own changes with Begin/EndChangeCheck(), reset the values, then track again. You could track changes just in some fields but not others. And you could have some fields not backed by SerializedProperties at all.

The workaround you found is a reasonable approach for your specific case.

Oh ok thanks for reply