# The "Instanced" flag for UPROPERTY

**URL:** <https://forums.unrealengine.com/t/the-instanced-flag-for-uproperty/17030>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [December 12, 2014, 12:54pm UTC](https://forums.unrealengine.com/t/the-instanced-flag-for-uproperty/17030 "2014-12-12T12:54:42Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![tuatec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tuatec](https://forums.unrealengine.com/u/tuatec)\
**Post date:** [July 3, 2022, 7:45am UTC](https://forums.unrealengine.com/t/the-instanced-flag-for-uproperty/17030/6 "2022-07-03T07:45:11Z")

</div>

Thank you so much for the detailed explanation!

I had an issue as well with Instanced objects contained in a TArray and saw constant crashes. This is how my simple example looked like.

```auto
UCLASS(Abstract, EditInlineNew)
class UMyClass : public UObject
{
  GENERATED_BODY()
	
  UPROPERTY(EditAnywhere, Category = "Dont|Crash")
  uint8 ValueBase;
};

UCLASS()
class UMyClassChild : public UMyClass
{
  GENERATED_BODY()

  UPROPERTY(EditAnywhere, Category = "Dont|Crash")
  uint8 ValueChild;
};

UCLASS()
class SOME_API USomeClass : public UObject
{
  GENERATED_BODY()

  UPROPERTY(Instanced, EditDefaultsOnly, Category = "Dont|Crash")
  TArray<TObjectPtr<UMyClass>> Array;
}

```

It seems to be that this is an uncovered use case. If I change the Category for the Array to something that is not “Dont|Crash”, then I don’t see any crashes. 💪

Or change the categories of your instanced class members. 😉

EDIT:  
It seems to work if you don’t use sub categories with |. Also I saw some weird object editor properties that are not contained in the instanced objects. I don’t recommend using the exact same sub categories like your own object (actor, actor component …).

---

_[View the full topic](https://forums.unrealengine.com/t/the-instanced-flag-for-uproperty/17030)._
