How to add items to inventory component? (C++ or Blueprint)

  • lets say this is your inventory component:

image

  • interface implementation in the pickup actor:

image

  • player picks up an item and asks the inventory component to add it to the array:

There’s no need to the send Player reference to the item - beans should not care who the player is.


I had to assume a lot - not sure what we’re really working with but that’s what I’ve gathered.