As with most nodes, object reference outputs can be directly connected to interface-typed inputs on "make container" nodes (e.g. "MakeArray") if the object's class type implements the interface class.
However, there is currently no cast logic in place to convert the object term to an interface term, so the input remains an object reference term at runtime. This means the VM will only store the object's address into the first field of the FScriptInterface type for each input value, so the interface address field of each element is left as NULL as a result. This is demonstrated by the "invalid" case in the attached project.
By contrast, the "valid" case in the attached project works because Array_Add is a function call rather than a custom node type, and function call nodes already add an implicit cast from object to interface at compile time (see FKCHandler_CallFunction::RegisterNets).
In lieu of a fix, the workaround is to explicitly add a "Cast to <interface type name here>" node in between the object reference output and the "make container" node's input pin (see attached image).
Note: this issue will also be exhibited by "MakeSet" and "MakeMap" container nodes. These are not covered in the attached project, but test cases can be set up similarly.
LogClass: Warning: Invalid InterfacePointer - Object Name (MyObject_1)
Expected result: No warnings appear in the output log.
N/A
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
I'm working on a VR Project and I cannot add Nav Mesh to the stairs??
How to achieve HLSL Multiple Render Target in Material blueprints?
Teleporter in the Creative Hub is Locked and cannot be accessed
Why does the REMOVE method of map container remove elements have memory leaks?
What method is used to fill polygonal regions when drawing spline mesh at run time?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-175413 in the post.
0 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.27, 5.0, 5.1 |
Target Fix | 5.6 |
Created | Jan 28, 2023 |
---|---|
Updated | Oct 1, 2024 |