Hello,
I’m creating an inventory that is slot-based, that can support different slots types
and the slots are UObjects that hold information like UItem*, Quantity etc…
I was wondering if the slots can get garbage collected ?
Is it a good idea to create it that way if i plan to Save/Load or Replicate it later?
How im doing it
BaseActorComponent Holds a TArray / TMap of slots : TArray and/or TMap
Then on BeginPlay i initialize TMap / TArray to empty elemts eg. 30 Elements of type USlot*
UBaseActorComponent : UActorComponent
|__ UInventoryComponent
|__ USomeLootBoxComponent
USlot : UObject
|__ UInventorySlot
|__ USomeOtherSlotType