I have URPGAttributeBase class, which have property:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Data")
UDataTable* AttributeDataTable;
And I set this property in Blueprint Default Properties in Editor.
I have also URPGAttributeComponent class:
Which takes:
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Attributes")
TSubclassOf<class URPGAttributeBase> AttributeClass;
UPROPERTY(BlueprintReadOnly, Category = "Attributes")
URPGAttributeBase* Attribute;
And then:
void URPGAttributeComponent::GetOrCreateAttribute()
{
if (AttributeClass)
{
if (!Attribute)
{
Attribute = ConstructObject<URPGAttributeBase>(AttributeClass);
}
}
}
And Attribute is created properly. Expect that:
AttributeDataTable
Is Null. Any idea why it is not passed from blueprint, while contructing object ?