Download

BeginPlay event in UBlueprintFunctionLibrary

I’m having trouble figuring this one out.

I have a class derived from UBlueprintFunctionLibrary and I’d like to use a begin play event in it. I see AActor supports this, but UBlueprintFunctionLibrary doesn’t seem to.

How would I go about getting a begin play event to fire in my plugin?

You don’t have access to to BeginPlay in UBlueprintFunctionLibrary, as it doesn’t really exist on world, it’s just class for containing static functions exposed to blueprints.

How would I go about initiating something when the play button is pressed? This is from the context of a plugin that doesn’t have any in-world assets, but does something during PIE. I know this is more of a design question, so I’d be happy with a design answer. :slight_smile:

I don’t know what you’re actually trying to do but there are delegates that get invoked when PIE starts/stops:



FEditorDelegates::PreBeginPIE
FEditorDelegates::BeginPIE
FEditorDelegates::EndPIE