Restricting UDataTable UPROPERTY selector in editor to data tables with specific row structs

I’m using several data tables with a various row structs. I have a UActorComponent sub-class that has UPROPERTY UDataTable* member variables for each of the different tables.

One annoyance is that when picking the data table assets for each UPROPERTY, all of the data tables show up in the picker, even then my code requires tables with a specific row structure.

Is there a way to restrict which data tables show up in the picker, so that only data tables with compatible row structs are listed?

1 Like

Yes, using RequiredAssetDataTags with RowStructure. For an example, see URichTextBlock’s implementation in RichTextBlock.h.

UPROPERTY(EditAnywhere, Category=Appearance, meta=(RequiredAssetDataTags = "RowStructure=RichTextStyleRow"))
class UDataTable* TextStyleSet;
8 Likes

wow, good on you to come back and give yourself the answer 2 years later :slight_smile:

1 Like

It’s because I forgot and found my same question 2 years later :wink:

2 Likes

As I can’t find any documentation about this, do you have any idea how you would be able to restrict FDataTableRowHandle to tables with certain structs in the same way? (if possible?)

For me, to restrict FDataTableRowHandle to a certain struct, meta=(RowType="MyStruct"), worked fine

1 Like