Interfaces and event dispatchers

Your Inventory manager should be the ruling body for ammo. This is typically in an actor component in the Player State class. Inventory is Data. Manipulation of that data happens in the class in which it is stored.

ALL Character UI should be managed by the Controller class vs in the character.

Weapon fires → BPI to Controller (deduct ammo).
Controller → BPI to Player State → Deduct Ammo.
Player State (Deduct Ammo Event), On change → BPI Controller → Update Ammo (current ammo #)
Controller (Update Ammo Event): calls event in UI (Widget) that sets text.

Controller creates a reference variable for each individually created widget.
e.g. crosshair, inventory etc.

Absolutely no casts needed here. Just organized BPI’s.

I have a BPI for every core class.


You have direct access from Player State to Controller and vice versa without casting.
These are generic references to the base parent class. Interfaces are inherited at the root parent class.


Controller can get a generic reference to the character and vice versa.


From a component/Actor that is a part of or attached to a pawn you can walk the chain to get generic references.