August 1, 2014, 10:19pm
I’m using UE 4.3 on Windows 7 and I’m having trouble figuring out where to provide the definitions for inherited blueprint functions that do not include return values. Here are the repo steps:
Create a blueprint interface and create a function that doesn’t contain any return values. Save/Compile.
Create an actor, add the interface, save/compile, and notice the function doesn’t seem to appear for the actor.
Add another function with a return value in the same interface created in step 1. Save/compile.
Notice only the function with a return value is listed under “Interfaces” for the actor created in step 2.
Is this intended behavior? The official docs don’t seem to mention anything about it.
Thanks for any help/insight.
August 1, 2014, 10:46pm
Interface functions without return values appear as custom events in implementing classes, for some reason (just in case you had not noticed and really need to implement something like right now
August 1, 2014, 11:13pm
Thanks Xenome, that clears up the confusion. That’s a really strange and inconsistent behavior for blueprint interfaces.
August 2, 2014, 12:11am
Thanks to Xeonme’s clarification about where Unreal places interface functions without return values I was able to figure out how to provide the definitions. Here’s the full answer:
Interface functions without return values apparently will not be listed in the “My Blueprint” tab. Instead I had to use the
Palette window to find the generated event for the function:
I dropped the event node in a new graph and provided the definition (can also use the default event graph).
As Xenome points out, functions without parameters are placed as Events. The interface is a bit confusing, but that is intended. I’m checking with the developers to see if they want to include Events in the My Blueprint panel. In the meantime, what you posted above should work fine. Thanks for posting this answer for other users to find!
My workaround is to always add a “success” output parameter. I don’t see why you consider a function without a return an “event”.
Helpful workaround even after 2 years…Thanks mate, hopefully it will be changed.