I’m getting an error:
error : Class must inherit UObject or a UObject-derived class
I used a Generic class from Unreal engine editor… My structure is like this:
#pragma once
#include “GameFramework/Character.h”
#include “ActorAnimations.h”
#include “BasePlayer.generated.h”
/**
*
*/
UCLASS()
class ****_API ABasePlayer : public ACharacter, public ActorAnimations
{
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;
private:
void InitializeAllDependantObjects(const FPostConstructInitializeProperties& PCIP);
void SetUpCameraComponent();
void SetUpCameraBoonComponent();
};
You can see here that my Character inherits its animations from a class I am creating (to allow separate programmers to work on that file at once)
Here is that ActorAnimations class I generated:
#pragma once
/**
*
*/
UCLASS()
class ****_API ActorAnimations
{
GENERATED_UCLASS_BODY()
// The animation to play while running around
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animations)
class UPaperFlipbook* RunningAnimation;
// The animation to play while idle (standing still)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animations)
class UPaperFlipbook* IdleAnimation;
public:
ActorAnimations();
~ActorAnimations();
};
what am I missing?