Description

When adding elements to an array inside a code class, blueprint instances of the class do not have their array updated after a hot reload.

Steps to Reproduce

1. Open UE4 Editor (any project)
2. Create new class based on Actor (MyActor)
3. Create new class based on Object (MyObject)
4. Add a statement to include MyObject.h in MyActor
5. Add the following code to MyActor.h:

UPROPERTY(Instanced, EditAnywhere, EditFixedSize, BlueprintReadWrite, Category = "Test")
TArray< class UMyObject* > MyArray;

UMyObject* element;

6. In the constructor of MyActor.cpp add one element to MyArray

MyArray.Add(element);

7. Compile
8. Create a blueprint based on MyActor (MyActorBP)
9. Add instance of MyActorBP to the level
10. In Visual Studios, add addition elements to MyArray (see step 6)
11. Compile to trigger hot reload in editor

Result:
Blueprint array does not update as more elements are added in code.

Workaround:
Adding a new instance of the blueprint after compile will show correct number of elements

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Cannot Reproduce
ComponentUE - Gameplay - Blueprint
Affects Versions4.7.6
Target Fix4.9
CreatedMay 5, 2015
ResolvedJun 12, 2015
UpdatedApr 27, 2018
View Jira Issue