# Event is null on BeginPlay, but it's set in Editor

**URL:** <https://qa.fmod.com/t/event-is-null-on-beginplay-but-its-set-in-editor/23264>\
**Category:** Unreal Engine\
**Tags:** cpp, ue5\
**Created:** [August 23, 2025, 3:21pm UTC](https://qa.fmod.com/t/event-is-null-on-beginplay-but-its-set-in-editor/23264 "2025-08-23T15:21:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hesa656](https://avatars.discourse-cdn.com/v4/letter/h/a9a28c/32.png) [@hesa656](https://qa.fmod.com/u/hesa656)\
**Post date:** [August 23, 2025, 3:21pm UTC](https://qa.fmod.com/t/event-is-null-on-beginplay-but-its-set-in-editor/23264/1 "2025-08-23T15:21:41Z")

</div>

Hey,

In `InteractableActor.h`I have this event

```auto
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Audio|FMOD")
	UFMODEvent* ScrapeEvent;

```

I created `BP_Interactable` blueprint and it’s have `InteractableActor`as parent, and I’ve set `ScrapeEvent`to `Scrape_Wood`event, but in this code:

```auto
void AInteractableActor::BeginPlay()
{
	Super::BeginPlay();

	PreviousLocation = GetActorLocation();
	MeshComponent->OnComponentHit.AddDynamic(this, &AInteractableActor::OnHit);

	if (ScrapeEvent != nullptr)
	{
		FMOD::Studio::EventDescription* scrapeDescription = IFMODStudioModule::Get().GetEventDescription(ScrapeEvent, EFMODSystemContext::Runtime);
		scrapeDescription->createInstance(&ScrapeInstance);
		Print("Created instance from Scrape Event!", 1);
	} else
	{
		Print("Scrape Event is not set!", 1);
	}
}

```

`Print("Scrape Event is not set!", 1); `is called - the question is why, because I have `ScrapeEvent` set in my Blueprint.

**Also** - in `BP_Interactable`I’ve added these nodes, and it returns that ScrapeEvent is valid.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/a/aab950c747af03fd748ed211e034118d6d930d23.png)

**EDIT:**  
I removed `if (ScrapeEvent != nullptr)`and now it works, but how could I check if event is valid? `if (ScrapeEvent)`doesnt work too.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [September 3, 2025, 1:35am UTC](https://qa.fmod.com/t/event-is-null-on-beginplay-but-its-set-in-editor/23264/2 "2025-09-03T01:35:47Z")

</div>

Apologies for the delay. So far I have not been able to reproduce it to get a solid answer for you.

Something that comes to mind is where blueprints are serialized from disk too early, before any plugins are loaded: [https://www.fmod.com/docs/2.03/unreal/user-guide.html#loading-blueprints-before-plugin-load](https://www.fmod.com/docs/2.03/unreal/user-guide.html#loading-blueprints-before-plugin-load)

Otherwise you could see if using `TObjectPtr<UFMODEvent>` instead of the raw pointer makes any difference.
