Pass by reference variables do not work when called from a blueprint interface between two blueprints.
Workaround: Use direct communication to pass by reference between two blueprints.
Steps provided by user [Reproduced Internally]:
1: Create a new interface, create a new function, add a Boolean input parameter, and set Pass-by-reference true.
2: Create a new actor BP, add the interface to this BP.
3: Create the event you created in the interface.
4: Drag the Boolean parameter, and type "set by ref". When the Set Boolean (by Ref) node is created, set the value to True. - (So, whatever Boolean parameter we pass to this function will be set to true.)
5: Compile this BP, and add an instance to the scene.
6: Create an actor based BP (or select if you have any) on your scene.
7: Create a new actor variable, make it public, go back to the scene, and set this variable to the BP you created in Step 2.
8: Create a new Boolean variable, and make it public. Make a call to the interface function, and pass the Boolean parameter to this function.
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.7 |
Target Fix | 4.8 |
Created | Feb 25, 2015 |
---|---|
Resolved | Apr 29, 2015 |
Updated | Apr 27, 2018 |