Download

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?

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;
1 Like

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

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

1 Like