#include "C_DecalTest_1.h"
#include "Components/DecalComponent.h"
#include "C_NationsPlayerController.h"
#include "Runtime/Engine/Classes/Kismet/GameplayStatics.h"
#include "Runtime/Engine/Classes/GameFramework/PlayerController.h"
#include "Components/DecalComponent.h"
#include "Materials/MaterialInterface.h"
#include "UObject/ConstructorHelpers.h"
#include "Materials/MaterialInterface.h"
#include "PhysicsEngine/PhysicsSettings.h"
#include "Kismet/GameplayStatics.h"
// Sets default values
AC_DecalTest_1::AC_DecalTest_1()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
DecalComponent = CreateDefaultSubobject<UDecalComponent>(TEXT("MyDecal"));
static ConstructorHelpers::FObjectFinder<UMaterial> FoundMaterial(TEXT("/Game/DecalMat.DecalMat"));
if (FoundMaterial.Succeeded())
{
DecalMaterial = FoundMaterial.Object;
}
DecalDynamicMaterialInst = UMaterialInstanceDynamic::Create(DecalMaterial, DecalComponent);
DecalComponent->SetDecalMaterial(DecalDynamicMaterialInst);
}
// Called when the game starts or when spawned
void AC_DecalTest_1::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void AC_DecalTest_1::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
UGameplayStatics::GetPlayerController(GetWorld(), 0)->GetMousePosition(MouseX, MouseY);
UE_LOG(LogTemp, Warning, TEXT("MousePositiion: %f"), MouseX, MouseY);
}
bool UGameplayStatics::FindCollisionUV(const struct FHitResult& Hit, int32 UVChannel, FVector2D& UV)
{
}
This is my code and at the very end is “FindCollisionUV”, now when I put the function in the cpp file its gives me this error…
how do I fix this?
this is my declarations in my header file just in case,