When an array is passed into a BP custom event, the array's data is passed to the event rather than a pointer to the array itself. This means edits made directly from the event node's input pin (such as adding an element to the array) do not affect the original array. Checking the box for "Pass by Reference" does not affect this behavior. This is inconsistent with how arrays are read in C++ and BP functions where editing the array affects the array everywhere.
Workaround:
Using a function instead of custom event allows edits using the input pin to affect the original array.
Result:
The length of the array is first printed in red and shows three elements, then is printed again in blue still showing three elements.
Expected:
Three gets printed in red followed by four being printed in blue to indicate the addition to the array.
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
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
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 achieve HLSL Multiple Render Target in Material blueprints?
Head over to the existing Questions & Answers thread and let us know what's up.
12 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.13.1 |
Created | Oct 12, 2016 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |