Hi.
I have a little c++ interface:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "UObject/ObjectMacros.h"
#include "UObject/ScriptMacros.h"
#include "UObject/Interface.h"
#include "CppErstlingDamageInterface.generated.h"
UINTERFACE(MinimalAPI, Blueprintable)
class UCppErstlingDamageInterface : public UInterface
{
GENERATED_BODY()
};
class ERSTLING_API ICppErstlingDamageInterface
{
GENERATED_BODY()
public:
virtual bool CppCanTakeDamage();
virtual void CppTakeDamage(float damage, FVector location, FVector normal, AController* killer, AActor* weapon);
};
i implement it in a character class: (.h)
UCLASS()
class ERSTLING_API ACppErstlingCharacter : public ACharacter, public ICppErstlingDamageInterface
{
...
and in .h:
virtual bool CppCanTakeDamage() override;
and cpp:
bool ACppErstlingCharacter::CppCanTakeDamage()
{
return true;
}
the same for the other function.
but i always get compiler error “Fatal Error LNK2001 unresolved external”.
im trying for an hour but i cant get a solution.
please help