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

**URL:** <https://forums.unrealengine.com/t/object-created-with-createdefaultsubobject-null-after-copying-blueprint-asset-in-editor/1711587>\
**Category:** Programming & Scripting\
**Tags:** constructors, unreal-engine, null, CPP, question\
**Created:** [February 25, 2024, 12:16pm UTC](https://forums.unrealengine.com/t/object-created-with-createdefaultsubobject-null-after-copying-blueprint-asset-in-editor/1711587 "2024-02-25T12:16:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joost](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Joost](https://forums.unrealengine.com/u/Joost)\
**Post date:** [February 25, 2024, 12:16pm UTC](https://forums.unrealengine.com/t/object-created-with-createdefaultsubobject-null-after-copying-blueprint-asset-in-editor/1711587/1 "2024-02-25T12:16:14Z")

</div>

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");

```

---

<div class="post-metadata">

**Author:** ![IrSoil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IrSoil](https://forums.unrealengine.com/u/IrSoil)\
**Post date:** [February 25, 2024, 1:29pm UTC](https://forums.unrealengine.com/t/object-created-with-createdefaultsubobject-null-after-copying-blueprint-asset-in-editor/1711587/2 "2024-02-25T13:29:13Z")

</div>

Kinda known issue that, iirc, won’t be fixed. You can read more about it [here](https://github.com/tranek/GASDocumentation?tab=readme-ov-file#94-duplicating-blueprint-actors-is-setting-attributesets-to-nullptr), tldr: spawn attribute set at runtime instead of in constructor or just deal with the fact you can’t copy those blueprints

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [March 26, 2024, 1:29pm UTC](https://forums.unrealengine.com/t/object-created-with-createdefaultsubobject-null-after-copying-blueprint-asset-in-editor/1711587/3 "2024-03-26T13:29:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
