MVVM Inventory Study
Unreal Engine 5 / C++
I wanted to create a study project to learn how the new UMG Viewmodel (MVVM) worked in Unreal Engine, I decided it would be a good idea to use an inventory slot item to test it out.
I started by creating a widget that would function as the Inventory item, and I set up the main layout that would be connected to the viewmodel to be updated in run time. I wanted the inventory slot to look similar to the inventory in The Legend of Zelda: Echoes of Wisdom, that is why I made a quick material to simulate the selected state of the item slot.

Once the layout was complete, I created the viewmodel that was going to be used in C++:
As a final step, I set up the view model in the inventory widget with all its bindings, and setting up its creation type to "Manual". Through a third script that manages all inventory slots, I can assign the corresponding view model to each slot and update their data as needed. When its data is updated, it will automatically update the widget with the correct visuals.
