Object created with "CreateDefaultSubobject" null after copying blueprint asset in editor

Joost
Sun, 25 Feb 2024 12:16:13 +0000
Programming & Scripting

I have an AttributeSet object that gets created in my character’s constructor. If I duplicate a child blueprint asset, the AttributeSet is always null in the copy.
If I rename the variable and rebuild my project that fixes it, but if I duplicate the asset again, the same thing happens. The object is null in runtime and in the editor. This is in 5.3. Any ideas?

UPROPERTY()
UMyAttributeSet* AttributeSet;

...

AttributeSet = CreateDefaultSubobject<UMyAttributeSet>("AttributeSet");

3 posts - 3 participants