error C2027: use of undefined type 'UPaperFlipbookComponent'

The following code is giving me this error
error C2027: use of undefined type ‘UPaperFlipbookComponent’:


#pragma once

#include "GameFramework/Character.h"
#include "****.h" // contains Engine.h
#include "BasePlayer.generated.h"

/**
 *
 */
UCLASS() // Not sure what the config is for
class ****_API ABasePlayer : public ACharacter
{
	GENERATED_UCLASS_BODY()

	//Side view camera
	//https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Camera/UCameraComponent/index.html
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera)
	TSubobjectPtr<UCameraComponent> SideViewCameraComponent;

	//Camera boom positioning the camera beside the character
	//https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/USpringArmComponent/index.html
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera)
	TSubobjectPtr<class USpringArmComponent> CameraBoom;

	// Name of the Sprite component
	// static FName SpriteComponentName;

	/** The main skeletal mesh associated with this Character (optional sub-object). */
	UPROPERTY(Category = Character, VisibleAnywhere, BlueprintReadOnly)
	TSubobjectPtr<class UPaperFlipbookComponent> Sprite;
protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animations)
	class UPaperFlipbook* RunningAnimation;

	// The animation to play while idle (standing still)
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animations)
	class UPaperFlipbook* IdleAnimation;
	
	void UpdateAnimation();
	void MoveRight(float Value);
	virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
private:
	void InitializeAllDependantObjects(const FPostConstructInitializeProperties& PCIP);
	void SetUpCameraComponent();
	void SetUpCameraBoonComponent();
};

Any ideas what i’m noobing up?..

Hi Jimmy,

You need to include the flipbook component:

#include “PaperFlipbookComponent.h”

Cheers,
Michael Noland

Before I completely face palm, i’m just going to test this :slight_smile: I think I had included “UPaperFlipbookComponent.h” before and removed it because it didn’t work… If only I knew!!! :slight_smile: Thanks for your response brah! I’ll get back to ya…

1 Like

Do you find answer to this problem?