Dynamically changing Data Table Row Name

ManiacMuchin
Sun, 10 Mar 2024 13:46:01 +0000
C++

Hello!

I want to somehow dynamically change the Row Name of each entry in a Data Table to be the same name of the “item” I create. Is there a way to make that happen?

My struct has another struct of “FItemTextData” which contains the item name. Now in the Data Table I have created I just want the “Row Name” to be changed to the “ItemName”. There has to be a way to do this, I’ve been googling for days and I can’t find a solution. Thank you!

USTRUCT()
struct FItemTextData
{
    GENERATED_BODY()

    UPROPERTY(EditAnywhere)
    FName ItemName;

    UPROPERTY(EditAnywhere)
    FText Description;

    UPROPERTY(EditAnywhere)
    FText InteractionText;

    UPROPERTY(EditAnywhere)
    FText UsageText;
};

USTRUCT()
struct FItemData : public FTableRowBase
{
    GENERATED_USTRUCT_BODY()

    UPROPERTY(EditAnywhere)
    EItemRarity ItemRarity;

    UPROPERTY(EditAnywhere)
    FItemTextData ItemTextData;

    UPROPERTY(EditAnywhere)
    FItemStatsData ItemStatsData;

    UPROPERTY(EditAnywhere)
    FItemInfoData ItemInfoData;
};

2 posts - 2 participants