Arrays in viewmodels don't notify on modification

Hey folks,

We extensively use MVVM in our studio, and we’re just looking for clarification on why Arrays in Viewmodels don’t notify on mutation

I’m totally onboard with arrays not notifying when variables on its internal members change, that’s not what we’re looking for here.

Specifically when elements are added/removed/moved, why does the array not broadcast, is this a design decision, or a technical limitation, and in either case, is it possible that there’s a future where they would

The Working with Arrays section of the documentation explicitly calls this out (https://dev.epicgames.com/documentation/en-us/unreal-engine/umg-viewmodel-for-unreal-engine#working-with-arrays), but it’s an easy thing to forget, and an easy trap to fall into for people new to the system

Thanks

Hi Darcy,

Thank you for your inquiry. It’s a technical limitation as a FieldNotify flag is on the array property, not the elements. We explored that possibility with Observable Arrays but that type is not exposed to blueprint and there aren’t active plans for it. The recommended pattern for arrays (like other properties) is to keep them private and expose getter/setter (and Add/Remove for arrays) to manually notify.

I hope this helps,

Zahra