I am glad you’ve found out how it actually works now, good luck to you as well!
Just a short optional side-note: Depending on how big your Data Table gets, it might cause a slight lag to search through the entire data table every time you need to get access to the struct. I don’t know how you have obtained the value for “UnitMeleeWea”, but you might want to consider doing the following:
- On Begin Play, use the node “Data Table get Row Names”, then use a “For Each” Node out of the names and create an array of structs based on the data table.
- When selecting the weapon in the widget, link it directly to the entire struct and then you can save this struct (this data table row) as a separate variable and do stuff with it.
=> Yes, it requires you to deal with the entire struct every time compared to a struct with only two entries. So if your data table has few rows, but many columns, this approach might not be better.
I just wanted to give you some extra information because tiny things like these tend to upscale pretty heavily and ruin the game in the long-run.