Aight, so it ain’t workin!
HCharacter.h:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
include “GameFramework/Character.h”
include “HCharacter.generated.h”
UCLASS()
class CLEANHERO_API AHCharacter : public ACharacter
{
GENERATED_UCLASS_BODY()
public:
// Sets default values for this character’s properties
AHCharacter(const class FObjectInitializer& ObjectInitializer);
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
};
HCharacter.cpp:
// Fill out your copyright notice in the Description page of Project Settings.
include “CleanHero.h”
include “HCharacter.h”
AHCharacter::AHCharacter(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer.SetDefaultSubobjectClass<CustomMovementComponent>(ACharacter::CharacterMovementComponentName))
{
PrimaryActorTick.bCanEverTick = true;
}
// Called when the game starts or when spawned
void AHCharacter::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void AHCharacter::Tick( float DeltaTime )
{
Super::Tick( DeltaTime );
}
// Called to bind functionality to input
void AHCharacter::SetupPlayerInputComponent(class UInputComponent* InputComponent)
{
Super::SetupPlayerInputComponent(InputComponent);
}
Error:
Error C2065 ‘CustomMovementComponent’: undeclared identifier CleanHero C:\Users\Documents\Unreal Projects\Hero\Source\CleanHero\HCharacter.cpp 8
EDIT: I also added include “CustomMovementComponent.h” and added the dependency to the build file and that just created even more crazy errors