nable to Call SetIsAttacking from Animation Blueprint - Object Reference Issue

Hi all,

I’m currently working on an animation-driven attack system using Unreal Engine (v5.5). I’m trying to call a custom C++ function SetIsAttacking(bool) from my Enemy class within an AnimNotify event in my Animation Blueprint (MainAnim_BP).

Here’s the function in Enemy.cpp:

cpp

void AEnemy::SetIsAttacking(bool Attacking)
{
bIsAttacking = Attacking;
}


The header (.h):

UFUNCTION(BlueprintCallable)
void SetIsAttacking(bool Attacking);

UPROPERTY(BlueprintReadOnly)
bool bIsAttacking;


In my Animation Blueprint, I want to call this from `AnimNotify_AttackEnd`, but the "Set Is Attacking" node gives me an error:
**“HOTRELOAD Enemy 0 Object Reference is not compatible with Enemy Object Reference.”**

Here's what I've tried:

* Verified `SetIsAttacking` is marked as `BlueprintCallable`.
* Confirmed that the `Enemy` variable is correctly set in the Anim BP.
* Added validation checks for null pointers before calling.


![image|473x500](upload://mJVGu1QYYhgoVBoTJaHBagMWW7i.png)

Screenshots for clarity:
![Screenshot 2025-04-21 145643|690x268](upload://sLufxSOKllNTPsVEuMHM8NrgzhN.png)
It should be as like the one below 
![Screenshot 2025-04-21 145804|690x351](upload://9s8JISo8pDwrRLhhZFYC5OeW1aG.png)