# Array of instanced editinline objects within a component are not duplicated within placed actors with a component instance

**URL:** <https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 11, 2015, 9:56pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552 "2015-03-11T21:56:28Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon26705860](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon26705860](https://forums.unrealengine.com/u/anon26705860)\
**Post date:** [March 11, 2015, 9:56pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/1 "2015-03-11T21:56:28Z")

</div>

Say I have UMySpecificComponent with a member array MyArrayOfMySpecificUObjects. If UMySpecificComponent is added to an actor, placed in a level with multiple sub levels and a user attempts to save than the save will fail. The error is Graph is linked to private object(s) in an external package because the UMySpecificUObject entries in the instance of the actor are the same entries in the template/default object. The UMySpecificUObject entries are not new/duplicated.

Also see [https://forums.unrealengine.com/showthread.php?1243-Can-t-save-map-blueprint-with-class-using-EditInlineNew](https://forums.unrealengine.com/showthread.php?1243-Can-t-save-map-blueprint-with-class-using-EditInlineNew)

```
class UMySpecificComponent : public UActorComponent
{
UPROPERTY(EditAnywhere, Instanced, Category = "MyCategory")
TArray<class UMySpecificUObject*> MyArrayOfMySpecificUObjects;
...
}

UCLASS(BlueprintType, EditInlineNew, DefaultToInstanced)
class UMySpecificUObject: public UObject

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2d3ed244](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2d3ed244](https://forums.unrealengine.com/u/anonymous_user_2d3ed244)\
**Post date:** [March 12, 2015, 12:35am UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/2 "2015-03-12T00:35:55Z")

</div>

Hi ! You don’t happen to have a uproject that demonstrates the issue do you?

---

<div class="post-metadata">

**Author:** ![anon26705860](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon26705860](https://forums.unrealengine.com/u/anon26705860)\
**Post date:** [March 13, 2015, 9:10pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/3 "2015-03-13T21:10:32Z")

</div>

No I don’t. My project is too custom to strip out something like this. I can try to make one when I get some free time.

---

<div class="post-metadata">

**Author:** ![Nick\_Whiting](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nick\_Whiting](https://forums.unrealengine.com/u/Nick_Whiting)\
**Post date:** [March 17, 2015, 12:09am UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/4 "2015-03-17T00:09:33Z")

</div>

You might want to give it a shot in 4.7.3, which should be coming out soon. We’ve fixed many of these types of errors in that fix, so it’s worth checking out.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [April 3, 2015, 7:39pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/5 "2015-04-03T19:39:45Z")

</div>

Hi ,

Is this error still occurring in 4.7.3 or 4.7.4?

---

<div class="post-metadata">

**Author:** ![anon26705860](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon26705860](https://forums.unrealengine.com/u/anon26705860)\
**Post date:** [April 3, 2015, 7:45pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/6 "2015-04-03T19:45:18Z")

</div>

I apologize. I still haven’t tested it with one of those builds. My team doesn’t use release builds. I’ll get around to it one of these days.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [April 3, 2015, 8:33pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/7 "2015-04-03T20:33:27Z")

</div>

Hi ,

Not a problem at all! I will mark this thread as answered for tracking purposes. However if/when you update if you are still experiencing the error please comment here so we can continue to assist you.

---

<div class="post-metadata">

**Author:** ![smartyMARTY](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/smartymarty/32/678332_2.png) [@smartyMARTY](https://forums.unrealengine.com/u/smartyMARTY)\
**Post date:** [October 19, 2016, 1:43pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/8 "2016-10-19T13:43:07Z")

</div>

I know this is old, but I am having the same issue with the current release of 4.13. In fact, any EditInlineNew, DefaultToInstance, or Instanced keywords do not allow instantiation of UObjects in an Array of a UActorComponent. I have about 8 Child classes of the type that is declared.

![111547-arrayinstance.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/a/aaa9ae163fd18a85f0f8af8e5dc7b192b21ca222.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [October 19, 2016, 2:10pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/9 "2016-10-19T14:10:16Z")

</div>

Hi SmartyMARTY,

Do you have a sample project or steps I can take to reproduce this on my end?

---

<div class="post-metadata">

**Author:** ![undercover](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@undercover](https://forums.unrealengine.com/u/undercover)\
**Post date:** [November 16, 2016, 2:47pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/10 "2016-11-16T14:47:20Z")

</div>

I have same problem in 4.13.2. Unfortunately I can’t provide the project either.  
Also the following “ensure” macro is trigged when opening the actor that contains the ActorComponent in the editor.

```
const UObjectProperty* TargetPropety = Cast<UObjectProperty>(CurrentProp);
		if ( ensure(TargetPropety && TargetPropety->HasAnyPropertyFlags(CPF_InstancedReference)) )
		{ 
			return TargetPropety->GetObjectPropertyValue(ValuePtr);
		}

```

in file …\Engine\Source\Runtime\Engine\Public\InstancedReferenceSubobjectHelper.h : ln 96

Our code looks something like this:

```
UCLASS()
class UProductionComponent : public UActorComponent
{
	GENERATED_BODY()
public:
	// ...
protected:

	UPROPERTY(EditDefaultsOnly, Instanced, BlueprintReadOnly, Category = RTSCategory)
	TArray<class UProductionEntity*> productionEntities;

//...

UCLASS(editinlinenew, Blueprintable, BlueprintType)
class UProductionEntity : public UObject //...
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [November 20, 2016, 10:49pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/11 "2016-11-20T22:49:35Z")

</div>

Hey SmartyMarty and -

Can you explain or provide a short video of the outcome with the code that you’ve tested? I’ve tried setting up a project based on the information and code provided. Let me know if this setup is similar to what you’re seeing:

- Create new class as a child of UObject (named MyObject) with `UCLASS(BlueprintType, EditInlineNew, DefaultToInstanced)`
- Create new class as a child of UActorComponent (named MyActorComponent) with array of UMyObject  
( `UPROPERTY(EditAnywhere, Instanced, Category = "MyCategory") TArray ArrayOfMyObjects;`)
- Create a new class as a child of MyObject (named SecondObject)
- Compile code and make new blueprint based on Actor (named ActorBP)
- Add instance of My Actor Component to the blueprint
- Select My Actor Coponent and add element to array of MyObjects

When I click on the dropdown for the array element, I see both MyObject and SecondObject listed and can be set (See Screenshot). When I place an instance of ActorBP in the level, I can see the values set in the blueprint but these values cannot be changed on the instance. If this is the behavior you are referring to, please let me know. This does not seem like the intended behavior and has been reported here: [Unreal Engine Issues and Bug Tracker (UE-38871)](https://issues.unrealengine.com/issue/UE-38871) . In this case I was able to save the level/project without returning any errors as described in the original post. If you are getting an error when saving, please also explain how your level/project is setup as well. If the behavior you’re seeing is different than what has been described, please try to explain what the visual outcome is that you’re seeing so that I can be on the look out for the same behavior on my end.

Thanks

![115741-arrayofmyobjects.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/7/977fae245828606379655d293fb5141157d609e4.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [November 26, 2016, 5:28pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/12 "2016-11-26T17:28:38Z")

</div>

Hey SmartyMarty and -

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Cheers

---

<div class="post-metadata">

**Author:** ![alleysark](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alleysark](https://forums.unrealengine.com/u/alleysark)\
**Post date:** [March 22, 2017, 5:12am UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/13 "2017-03-22T05:12:17Z")

</div>

It is pretty old question… but,

When you got the error ‘Graph is linked to private object(s) in an external package’, I recommend you to ‘Try refresh all nodes’. It resolves the problems in many cases.

[https://docs.unrealengine.com/latest/images/Engine/Blueprints/UserGuide/Events/Custom/refresh\_all\_nodes.jpg](https://docs.unrealengine.com/latest/images/Engine/Blueprints/UserGuide/Events/Custom/refresh_all_nodes.jpg)

---

<div class="post-metadata">

**Author:** ![ZeroComfort](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZeroComfort](https://forums.unrealengine.com/u/ZeroComfort)\
**Post date:** [June 16, 2017, 4:20pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/14 "2017-06-16T16:20:07Z")

</div>

@- I am still having the same issue in 4.15 and I created a new question for it [here](https://answers.unrealengine.com/questions/658686/cant-add-uobject-derived-class-to-tarray-in-editor.html), I would appreciate any help I can get!

---

<div class="post-metadata">

**Author:** ![Zeclown](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeclown](https://forums.unrealengine.com/u/Zeclown)\
**Post date:** [January 1, 2019, 9:49pm UTC](https://forums.unrealengine.com/t/array-of-instanced-editinline-objects-within-a-component-are-not-duplicated-within-placed-actors-with-a-component-instance/310552/15 "2019-01-01T21:49:09Z")

</div>

Still the same problem in 4.21 unfortunately…  
It is a shame as it is a very useful workflow tool that’s used throughout the engine.
