Hello, I’m developing a GAS game as a portfolio, and I’ve been wandering around a lot in the Inventory UI, so I’m suddenly curious about how others develop it.
For now, PlayerState has managed the data and implemented ViewModel so that you can refer to the data in the inventory widget in MVVM format, but I hand it over to the data structure weak pointer in ListView or TileView and receive updates.
However, due to the nature of ListView, the update cycle is only updated when the slot changes, so even though it’s a fixed slot, I have to recreate the slot or update it to Deligate separately…
I wonder what other people do.
Decoupling the live state from the display list slightly. So instead of relying on slot replacement to trigger visual updates, fire manual broadcast delegates from ViewModel objects (usually custom UObject data wrappers) that notify individual widget entries when something changes.
Alternatively, you could lean on the FWidgetModelBinding system more heavily and use custom update logic per slot
Wow, thank you so much.
In particular, the idea of implementing the Delegate on the Wrapper Object was the last thing that came to mind.
I’m glad to receive a similar answer to what I think.
As you said, I’m also thinking of using the MVVM feature later.
Thank you again for the good answer.