override function not accessing from base class

i am facing this error in which when i am pressing F5 visual studio is failing to build the solution and not opening the engine, it is saying that the “Following modules are missing or built with different engine version”
There is not error in the code but it is not allowing me to create Dash projectile which i have to create from SBaseProjectile.

Also when i managed to create a new c++ file od SDashProjectile it is giving me error on compiling. I have attached the error screenshot.
Please guide me on what i am doing wrong

Thanks

Hey @Hasan_R Could you share C++ overridden function and the functions base class you are overriding from?

Sure here is the c++ code do let me know if there is anything else needed

include “SProjectileBase.h”
include “Components/SphereComponent.h”
include “GameFramework/ProjectileMovementComponent.h”
include “Particles/ParticleSystemComponent.h”
include “Kismet/GameplayStatics.h”
include “UObject/UObjectBaseUtility.h”

ASProjectileBase::ASProjectileBase()
{
SphereComp = CreateDefaultSubobject(“SphereComp”);
SphereComp->SetCollisionProfileName(“Projectile”);
SphereComp->OnComponentHit.AddDynamic(this, &ASProjectileBase::OnActorHit);
RootComponent = SphereComp;

EffectComp = CreateDefaultSubobject<UParticleSystemComponent>("EffectComp");
EffectComp->SetupAttachment(RootComponent);

MoveComp = CreateDefaultSubobject<UProjectileMovementComponent>("ProjectileMoveComp");
MoveComp->bRotationFollowsVelocity = true;
MoveComp->bInitialVelocityInLocalSpace = true;
MoveComp->ProjectileGravityScale = 0.0f;
MoveComp->InitialSpeed = 8000;

}

void ASProjectileBase::OnActorHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
{
Explode_Implementation();
}

void ASProjectileBase::Explode()
{
if (ensure(!IsPendingKill()))
{
UGameplayStatics::SpawnEmitterAtLocation(this, ImpactVFX, GetActorLocation(), GetActorRotation());

	Destroy();

}

}

void ASProjectileBase::PostInitializeComponents()
{
Super::PostInitializeComponents();
}

Hi, You skipped posting Explode_Implementation in the base class.
Is Explode_Implementation defined as virtual in the base class header?

Are you using the key word override after it’s header definition in the derived class?

Base class:

UFUNCTION()
virtual void Explode_Implementation ();

Derived class:

UFUNCTION()
virtual void Explode_Implementation override ();

it still says member function declared with ‘override’ does not override a base class member

Show your function declaration for Explode please

As I mentioned in a private message the base class function needs to be implemented in the following way:

UFUNCTION(BlueprintCallable, BlueprintNativeEvent)|
void Explode();
virtual void Explode_Implementation();

Then in the derived

virtual void Explode_Implementation() override;

Edit: The BlueprintNativeEvent function is stated inside of the base class and doesn’t need to be redefined in the derived one. Making changes or defining the blueprint exposed function from within the derived class would throw an error.

So this is absent in the derived class

UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void Explode();

Just the _implementation variant.

@3dRaven From what you have shared, it seems you might not have created definition in C++ file of it. In the base class in C++, function for implementation should be added even if it is empty. When using BlueprintNative, compiler looks for default function implementation first. in derived class if you don’t override the function it should create a link error.

You would get a link error with a lack of the _Implementation function. The blueprint native does not require an implementation in the cpp it is just a macro to expose the function to blueprints.

My code runs fine. There are no errors during linking or compiling.

You cannot override a BlueprintNativeEvent as it CANNOT be marked as virtual hence it cannot be override / changed by the engine. If you “double” the
base BlueprintNativeEvent in the derived class you will get a compile error saying that it can’t be redefined in the derived class.

Here is the full source for the files
ProjectilesSource.zip (2.8 KB)

This forum should be relevant to you.

One more question, is your implementation in a plugin or its in project source?