Accessing, modifying, retrieving map data type

Hello, I will Access to a map data that is called: Resources and [name - integer] contains example Wood, Stone, Gold lets say. Now I will Access it when I need to update Wood itself.

Later I will pass specific resources like wood itself to a 2D screen widget. Something like, Map-> getWoodValue ->->set->-> NewValue.

What is the correct way to do this ?

  • put this Resources map into a Actor Component. I will need casting/accessing it from elsewhere. I do not know if I did the correct thing with adding Actor Comp. for storing player units, resources, upgrades data. Is that okay for a RTS or should I need a different BP to store this kind of data ?