Interface - can't make it work.

I’m trying to use an interface to communicate between a Widget blueprint and a HUD blueprint (Want to show and hide menus when buttons are pressed). Clicking the button works (have a print string to check but for some send message is never received.

Edit: Oops, forgot to say this is unreal 5.3

Here’s the sender blueprint


Here’s the receiver

Both blueprints have the interface attached but for some reason the printstring in the receiver never fires. This looks like it should be simple but no matter what I’ve tried it just doesn’t work for me. Any ideas?

Only BP_HUD need the implemented interface while WBP Main Menu doesnt need.

If your BP_HUD is made from HUD type and setup from your world setting.
From the WBP MainMenu call the event this way:

since the reference come from your HUD. Look for the icon letterbox/msg for the calling function.

1 Like

That works perfectly (though I also had to realize it needed to be the function with (message) on it!

1 Like

Although really I’d like to know how to make the interface part actually work. This is just using a reference to another blueprint really and nothing to do with using an interface as far as I can tell.

But you can call it without knowing the class or knowing how the implementation looks like. That’s the interface part. You still need a target instance.


Unless you have an uncanny setup, having an interface on a framework class does not make much sense, imho. It’s always loaded → casting would work more than fine, better than an interface since it adds to the overall clutter.

1 Like

Yup it basically playing with the reference, it pretty useful with GetPlayerCharacter/Controller/HUD/GameMode where you can call a function interface from anywhere using these Get.

We used it often with EventOverlap that output an Actor and do some checking if it has x implemented interface.

Ok so interfaces don’t actually work with the HUD Class then? If so then it all makes sense (more or less). I will try them again later using actors and widgets etc if that works. I know it works from actor to actor (Tried that already with success).

Thanks for “edumacatin” the UE Noob!

It does work, it just that interface is more likely to be used when you want to provide a common functionality for different classes.

Like an interactive system, you can pop-up a different icon widget interaction using only enum(Talk, Pick Up etc…) on different actors without knowing their exact classes but only that enum variable. Since we want to avoid doing Cast to NPC_A > show Widget Talk, Cast to Tree > show Widget Cut etc…

So for a HUD, Player Character…, these are already in the memory so doing a casting is fine. It can be messy to have lot of files interface bp as well.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.