Hello everyone,
I’m trying to use a BlueprintNativeEvent in my code and one specific part of my code is causing a Access Violation:
======= .h ========
UFUNCTION(BlueprintNativeEvent, meta = (DisplayName = "Apply Effect"))
void ApplyEffect(AGenericCharacter* Receiver);
======= .cpp ======
void USkillEffect::ApplyEffect_Implementation(AGenericCharacter* Receiver)
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("ApplyEffect"));
}
======= call ======
USkillEffect* SkillEffect = Cast<USkillEffect>(SkillEffects[i]);
SkillEffect->ApplyEffect(EffectReceiver);
Everything goes fine until the code be executed:
Access violation - code c0000005 (first/second chance not available)
“”
I’m using a similar implementation in other part of the project without any problem… Is there something wrong in my implementation?