Can't see C++ event in blueprints?

I’ve had to create a super class for a blueprint I was working on as I needed to cast in C++ and couldn’t with a BP only class. Let’s call the Cpp & BP file MyClass and BP_MyClass.

As part of the old BP_MyClass, which was a regular Blueprint Class, I had a custom event void EventA(..)

I could cast to BP_MyClass in another blueprint file and then call EventA(...) on the casted output.

However, now that I’ve moved my event definition into cpp - MyClass,

public:
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
void EventA();

I can implement the event in the new BP_MyClass, which now derives from MyClass, fine.

However, when I cast to BP_MyClass in another blueprint file, I cannot call EventA(...).

It’s as if when I derive BP_MyClass from MyClass, the public EventA(...) is turned private, hiding it from other BPs.

It doesn’t show up in the right click menu with context sensitivity turned off either. Anyone know what I’m doing wrong?

Edit:
If I create a “new Custom Event” in BP_MyClass, I still can’t see that new one in another BP after casting. I’ve saved + compiled the bp and recompiled from vs to no success.

BP_MyClass
image

Other BP
image

Check if your blueprints are compiled without errors.

1 Like

Sorry for taking so long, I tried a recompile and it took a while to finish.

The only difference I notice between my class and your example is that I’ve made mine Blueprintable i.e.

UCLASS(Blueprintable)
class MY_API UMyClass : public UObject
{
	GENERATED_BODY()
public:
	UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
	void OnNewWidget();
};

So that I can base new BP classes on it. My BP is created by using “Create new Blueprint Class → Select UMyClass as the base”

image

Appears that my BP compiles just fine, this is the event in the BP

image

And then in the other BP that I’m trying to call this event from,

Thank you for helping :slight_smile:

Edit: I removed Blueprintable and I can’t see any difference - it still compiles fine. So I’m unsure why I had that in the first place. Although, I still can’t call the event so that wasn’t the issue

After some tinkering, I was able to use event dispatchers to get my desired effect. I’d imagine it’s not as versatile as if I had actually gotten the C++ events to work, but this suffices for my particular use case.

For future people who might need a workaround like me:

  1. Create an event dispatcher, name as you like
  2. Drag it onto the BP editor and select “Event” to create your custom event node
    image
  3. I’m unsure why this event worked, but I already had an “Init” event that showed up fine in other classes.
    image
    This meant I could tack onto the end of that execution thread a “Bind” to my event dispatcher,
    image
    Just link the In delegate param to the event you’ve just made for the dispatcher.
  4. In my other BP I can now call the event dispatcher
    image

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