'Instanced' TArray, don't correctly update in runtime.

Hello there !

I Have a class

UCLASS(Blueprintable,BlueprintType,EditInlineNew,DefaultToInstanced)
class UMyElement : public UObject
{
//...
};

And another class the contains an array of the previous class :

UCLASS(Blueprintable,BlueprintType,EditInlineNew,DefaultToInstanced)
class UMyType : public UObject
{
 //...
  UPROPERTY(BlueprintReadOnly,EditAnywhere,Instanced,Category ="Test")
  TArray<UMyElement*> Elements;
 //...
};

Now blueprint time !
I create a variable UMyType in a widget (added in viewport with a friendly actor).
I can instanciate it.
I can Add and instanciate elements.

But :

When I play in editor :
Only the first Element I instanciate is really instanced.
Others are nullptr.
If I set my variable to “None”, no change when I play in editor.

Maybe I’ve made some mistakes, but I don’t understant this behaviour.
Can someone have an idea what’s happened ?

I don’t know exactly why the behaviour appened.
But cleanning the ‘Intermediate’ and ‘Saved’ folders, seems to solve the problem.

So, if you struggle with this , try to clean and retry :wink: