Calling a Custom Event in another BP from a UMG Button Click doesn't work

In UMG I have a button which I added a Click Event to. On the click event, I want it to call a Custom Event from my Main Blueprint. In the picture you can see that I also added a “print string” node to make sure the button was working in the first place, and it does. I added a breakpoint to the Call for the custom event, yet when I was debugging, it didn’t even seem to trigger the event and would procede to the Print String node.

Why is it skipping over the Custom Event?

You I see the part of your BP where you fill the “Main Game Ref” variable?

Because usually the engine is always calling those. However if that variable has not been set (or been set incorrectly) it will point into nothing which will result in exactly that behavior. Nothing will happen.

If it was set incorrectly wouldn’t it be impossible to call my “Play Button” custom event?

I’m not sure if it is.

Certainly not while editing. It might throw a few errors while you’re playing but I wouldn’t be too surprised if it didn’t.

I mean nothing bad is happening. It simply isn’t reaching an actor. The same can happen very easily when you despawn something so any major warning or even a crash would not be too appropriate.

The variable “Main Game Ref” was created by… Adding a variable > changing it’s type to “object reference” targeting the BP_MainGame Blueprint > and was made editable.

I believe I have done the correct steps in creating this reference, yet I fear it may be as you said (where it is somehow incorrectly set).

Is there a fool proof way of making sure it is set correctly or not?


Have you set ur variable with the set node? you need to set the right reference to ur new variable. You can look if it gives you “none” when you " watch value". Use the Event Construct in ur UserWiget graph to set the reference.

The Blueprint to be referenced is technically set when you are creating this type of variable.

I still haven’t been able to fix this issue. Are there any other suggestions for why this isn’t working?