Picking parent class for Inventory System

Hello everyone,

I’m starting to work on Inventory system for my game, And I decided to create all functionality in a different class and create an instance of it in my Character. My first thought was to make it an UObject.

But I have some questions regarding that class.

  1. Okay first one: Is it a good place to create such functionality? I want to keep two references of my weapons(actors) as well as array of items (actors).
  2. How do I instantiate this class in my character? I’ve never done that in UE4 before. And it seems it’s not

Inventory* playerInventory = new PlayerInventory(size);

Best regards,

I would use an Actor Component. It’s a UObject with ties into AActor nicely, and IMO is the easiest way to set it up.