I recently started learning UE5, im following a tutorial and i have been getting errors non stop and i dont really understand why.
I created the AARollaBallPlayer script i fixed the folder creation error, but now that i have written the code i get more errors, can some one explain what im doing wrong cause working with UE5 so far has not been the best experience so far…
Edit: im using visual studio 2022.
Video
Errors:
identifier IImageWrapperModule is undefined
incomplete type is not allowed
ARollaBallPlayer.h:------------------------------------------------------------------------------------
#pragma once
#include “CoreMinimal.h”
#include “GameFramework/Pawn.h”
#include “ARollaBallPlayer.generated.h”
class USpringArmComponent;
class UCameraComponent;
UCLASS()
class TEST_API AARollaBallPlayer : public APawn
{
GENERATED_BODY()
public:
// Sets default values for this pawn’s properties
AARollaBallPlayer();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
//Definte Components
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
UStaticMeshComponent* Mesh;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
USpringArmComponent* SpringArm;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
UCameraComponent* Camera;
//Variables
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float MoveForce = 500.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float JumpImpulse = 1000.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 MaxJumpCount = 1;
public:
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
private:
int32 JumpCount = 0;
//Functions
void MoveRight(float value);
void MoveForward(float value);
void Jump();
};
ARollaBallPlayer.cpp-------------------------------------------------------------------------
// Fill out your copyright notice in the Description page of Project Settings.
#include “Test/Game/ARollaBallPlayer.h”
#include “GameFramework/SpringArmComponent.h”
#include “Camera/CameraComponent.h”
// Sets default values
AARollaBallPlayer::AARollaBallPlayer()
{
// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = false;
//Create compoments - Before this step they won't exist on our Actor, they've only been defined.
Mesh = CreateDefaultSubobject<UStaticMeshComponent>("Mesh");
SpringArm = CreateDefaultSubobject<USpringArmComponent>("SpringArm");
Camera = CreateDefaultSubobject<UCameraComponent>("Camera");
//Set the root component to be our Mesh.
RootComponent = Mesh;
//Attach the SpringArm to the Mesh, Spring will now follow the Mesh transform.
SpringArm->SetupAttachment(Mesh);
//Attach the Camera to the SpringArm, Camera will now follow the SpringArm transform.
Camera->SetupAttachment(SpringArm);
}
// Called when the game starts or when spawned
void AARollaBallPlayer::BeginPlay()
{
Super::BeginPlay();
}
// Called to bind functionality to input
void AARollaBallPlayer::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
}
void AARollaBallPlayer::MoveRight(float value)
{
}
void AARollaBallPlayer::MoveForward(float value)
{
}
void AARollaBallPlayer::Jump()
{
}