I was planning on implementing an abstract inventory class using a TMap to store items with their associated locations within the inventory, and expose them as readonly properties to blueprints. However, after adding the following UPROPERTY tag, it seems that I can’t use TMaps as properties:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, etc...)
The type would be something like this:
TMap<location_type, item_type> Items;
Is there any way to use a hashmap like this and expose it to a blueprint? I know I can implement it using a TArray, but not without creating a separate structure that stores an item’s locations within the inventory. And using a TArray seems kind of like a roundabout way of doing this.
Thanks for any tips!