In Unreal Engine Blueprints, whether an interface function is implemented as an Event in the Event Graph or as a Function in the Functions list depends on whether the function has a return value:
- Void Functions (No Return Value): These are implemented as Events in the Event Graph.
- Functions with Return Values: These are implemented as Functions in the Functions list.
From your description, it seems you want to implement a void interface function as a function in the Functions list, not as an event in the Event Graph. In the project you loaded, the void interface function is implemented as a function with an empty return node, which is what you want to replicate.
Here's how you can achieve this:
-
Add a Dummy Return Value to the Interface Function:
- Open your interface blueprint.
- Locate the void function you want to implement as a function.
- Add an output parameter to the function. This can be of any type (e.g., a boolean named
Dummy).
- Save the interface.
-
Implement the Interface Function as a Function in Your Blueprint:
- Open the blueprint that implements the interface.
- In the My Blueprint panel, under Functions, click on the Override dropdown.
- You should now see the interface function listed (since it has a return value). Select it to override.
- Implement the function logic as needed.
- You'll notice there's an output node (Return Node) at the end of the function. Since the return value is a dummy, you can leave it as default or set it appropriately.
-
Optional Cleanup:
- If you don't actually need the return value, and it's only there to allow implementation as a function, you can ignore it in your logic.
- Make sure that any calls to this interface function can handle the (unused) return value.
Explanation:
By adding a return value to the interface function, Unreal Engine treats it as a function rather than an event. This allows you to implement it in the Functions list with an empty return node, matching what you observed in the loaded project.
Additional Notes:
- Pure Functions: If you set the interface function to be Pure (in the interface function's details, check the Pure checkbox), it must not have any side effects and cannot contain any nodes with execution wires (no sequence of actions). This may not be suitable if your function needs to perform actions.
- Consistency: Ensure that all blueprints implementing this interface function are updated to handle the new return value to avoid any discrepancies.
- Alternative Methods: If modifying the interface isn't an option (e.g., it's part of a plugin or external library), you might need to work with events or create a workaround specific to your project's needs.
Summary:
To implement a void interface function as a function rather than an event in Unreal Engine Blueprints, add a dummy return value to the interface function. This changes its implementation from an event to a function, allowing you to organize your blueprint logic as desired.