Interface Message Not Heard by UI Blueprint

Thank you for replying. I think you’re right - After this issue I’ve also had another issue with Actor references for example. It seems my problem is mostly about the object references in the variables not being able to find the object I’m trying to point to.

Turns out that when you’re in a blueprint and you assign a variable pointing to another object’s reference, sometimes these references return NULL (even though in my case most of these objects are either placed on the level in the Editor to begin with). Without knowing much about how Unreal Engine does things on the backend, I found a few more threads and it seems like this has something to do with some assets being created at runtime and some variables being unable to get assigned to the actual objects being created in runtime, so they come up NULL.

In the case of Interface events, as you’ve pointed out this situation fails silently, so you need to do a little bit more to debug to confirm this is the case.

One way I discovered to confirm this was this:

After I create a local variable in Blueprint A pointing as an Object Reference to Blueprint B, I can drag from the reference variable like this, and use the “Is Valid” node:

(Make sure to use the “IsValid” node with the Question Mark icon)

If the “Target” variable in this case is NULL, the “Is Not Valid” execution route will happen. I was able to debug variables using this method with print nodes to see that many of my local variables were trying to reference objects that were not created at the time the variables were looking them up, I suppose.

So ultimately, I still haven’t solved the problem, but for now I’m deciding to use some workarounds and will return to this problem in the future when I have a better understanding of Unreal Engine. No use for me to lose my mind over this since I’ve been stuck on this one topic for more than a week.

A couple things I found that could lead folks in the right direction should anyone come across this thread in the future:

  • For these types of issues, consider using the Level Blueprint. Apparently objects placed in the level blueprint are already there when runtime begins, and your references will not fail from what I understand?

https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Types/Interface/UsingInterfaces/
mentions:

Thanks everyone. For now I’m giving up on this, will be using some workarounds and other methods to achieve my goals. Still a complete beginner so I’m trying not to get too hung up on one thing when there’s a whole world for me to learn. And I’m hoping learning those other topics will in the future make it easier for me to grasp this one once I’m ready.

1 Like