I have a function that adds a copy of AC_PickupItem to an array like that:
void AC_Ch_Player::AddToInventory(AC_PickupItem* PickedItem)
{
Inventory.AddUnique(PickedItem);
}
where Inventory is declared as
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Player State")
TArray<AC_PickupItem*> Inventory;
and the UENUM is declared as
UENUM(BlueprintType)
enum EPickupItemType
{
Remapper UMETA(DisplayName = "Control Remapper"),
Shield UMETA(DisplayName = "Protective Shield"),
SpeedUp UMETA(DisplayName = "Speed Booster"),
SpeedDown UMETA(DisplayName = "Speed Reducer"),
MapResetter UMETA(DisplayName = "Map Resetter")
};
and its variable is
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item Properties")
TEnumAsByte<EPickupItemType> ItemType;
now when I get the array and get the UENUM’s value and try to print it out, (as shown in the picture) it always goes through the first execute pin (control Remapper) no matter what the UENUM’s value is actually set to. I’m sure that it’s set correctly to different values because if i try to log it directly from C++ using UE_LOG it logs the correct value.
Any help would be appreciated. Thanks