I have a class that extends UDataAsset that includes an AActor*
property. It compiles fine, and I can see the property when I’m editing an asset of my custom type. The problem is that when I try and select an actor as a value, the field stays at None
. I have tried selecting an Actor from the dropdown, and also using the dropper to select an Actor from the scene and neither works. I’ve tried using both class AActor* ...
and TSubclassOf
in my C++ class and neither seems to make a difference.
Here’s the class header, I did not include the FDialogLines
as it’s simply a struct with a few fields and irrelevant to this issue:
UCLASS(BlueprintType)
class URHDialogScript : public UDataAsset
{
GENERATED_BODY()
int32 LineNum;
public:
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = DialogLine)
class AActor* PrimaryActor;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = DialogScript)
TArray<FDialogLine> DialogLines;
UFUNCTION(BlueprintCallable, Category = DialogScript)
bool IsAtLastLine();
UFUNCTION(BlueprintCallable, Category = DialogScript)
void Reset();
UFUNCTION(BlueprintCallable, Category = DialogScript)
FDialogLine Next();
};
A few screenshots showing the issue in the editor.