# Elements in array of Instanced UObjects on a Blueprint Component attached to an Actor are cleared when the Component is recompiled 

**URL:** <https://forums.unrealengine.com/t/elements-in-array-of-instanced-uobjects-on-a-blueprint-component-attached-to-an-actor-are-cleared-when-the-component-is-recompiled/2674119>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [October 7, 2025, 9:33pm UTC](https://forums.unrealengine.com/t/elements-in-array-of-instanced-uobjects-on-a-blueprint-component-attached-to-an-actor-are-cleared-when-the-component-is-recompiled/2674119 "2025-10-07T21:33:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 7, 2025, 9:33pm UTC](https://forums.unrealengine.com/t/elements-in-array-of-instanced-uobjects-on-a-blueprint-component-attached-to-an-actor-are-cleared-when-the-component-is-recompiled/2674119/1 "2025-10-07T21:33:18Z")

</div>

As the title describes, we’ve found a repro in 5.5 where the elements of a TArray of Instanced UObjects are unexpectedly set to None when a blueprint component is recompiled.

```auto
#pragma once

#include "Components/ActorComponent.h"
#include "XYZTestInstancedObjectsComponent.generated.h"

UCLASS(Blueprintable, BlueprintType, EditInlineNew)
class XYZGAME_API UXYZTestInstancedObject : public UObject
{
    GENERATED_BODY()
};

UCLASS(BlueprintType, Blueprintable, meta=(BlueprintSpawnableComponent))
class XYZGAME_API UXYZTestInstancedObjectsComponent : public UActorComponent
{
    GENERATED_BODY()

protected:
    UPROPERTY(EditDefaultsOnly, Instanced, NoClear)
    TArray<UXYZTestInstancedObject*> InstancedObjects;
};

```

Using the above code:

1. Create an Actor
  1. BP\_Test\_Actor

2. Create a Blueprint Component derived from UXYZTestInstancedObjectsComponent
  1. Comp\_TestInstanceObjects

3. Add Comp\_TestInstanceObjects to BP\_Test\_Actor
4. Add elements to the InstancedObjects array on the added component, set them to the base type UXYZTestInstancedObject
5. Open the Comp\_TestInstanceObjects blueprint and press Compile
6. Observe that the array elements on the Comp\_TestInstanceObjects attached to BP\_Test\_Actor have been set to None

In testing, we see that this appears to be fixed in 5.6, but we’re not looking to take that version yet, and are interested in finding the specific CLs we might be able to cherrypick. Any ideas?

---

<div class="post-metadata">

**Author:** ![ZhiKangShao](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zhikangshao/32/1089997_2.png) [@ZhiKangShao](https://forums.unrealengine.com/u/ZhiKangShao)\
**Post date:** [October 13, 2025, 12:23pm UTC](https://forums.unrealengine.com/t/elements-in-array-of-instanced-uobjects-on-a-blueprint-component-attached-to-an-actor-are-cleared-when-the-component-is-recompiled/2674119/2 "2025-10-13T12:23:38Z")

</div>

Hi there! I believe CL 44220549 a.k.a. GitHub commit [5025b6d3b4cf7698c026b2d7facd614dc5c2e9f6](https://github.com/EpicGames/UnrealEngine/commit/5025b6d3b4cf7698c026b2d7facd614dc5c2e9f6) is what you’re looking for. This fix rolled out with UE 5.6.1 and adds fixing up references to reinstanced subobjects when their class got recompiled.
