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.
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
LS-0019-IS-PQR23 on the start of running UE4
I am not able to find world outliner how to enable it?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
What method is used to fill polygonal regions when drawing spline mesh at run time?
How to achieve HLSL Multiple Render Target in Material blueprints?
Delay nodes occasionally don't fire the "Completed" output in a nativized build
How can i modify the param name in EQS node
How to properly terminate the DoWork thread function in FAsyncTask?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.7.6 |
Target Fix | 4.9 |
Created | May 5, 2015 |
---|---|
Resolved | Jun 12, 2015 |
Updated | Apr 27, 2018 |