I just want to link sprite to paperSpriteComponent and keep getting this 3 errors:
1.Use of undeclared identifier ‘ConstructorHelpers’;
2.Member reference base type ‘const wchar_t [28]’ is not a structure or union;
3.‘UPaperSprite’ does not refer to a value;
// Fill out your copyright notice on the Description page of Project Settings.
#include "Skybox.h"
#include "PaperSpriteComponent.h"
#include "PaperSprite.h"
// Sets default values
ASkybox::ASkybox()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = false;
if(!RootComponent) {
RootComponent = CreateDefaultSubobject<USceneComponent>(TEXT("SkyboxBase"));
}
SkyboxSprite = CreateDefaultSubobject<UPaperSpriteComponent>(TEXT("SkyboxSprite"));
SkyboxSprite->SetupAttachment(RootComponent);
// this line gives errors without it project compiles just fine
SkyboxSprite->SetSprite(ConstructorHelpers::FObjectFinder<UPaperSprite>(TEXT("/Game/Sprites/Skybox_Sprite")).Object);
}
// Called when the game starts or when spawned
void ASkybox::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ASkybox::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
I am out of ideas. I’ve tried to make it work all day, but keep getting the same error.