C++ Actor Component polymorphism

I am trying to create two actor componets. One parent and one child.

UCLASS(Abstract, ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class GAME_API UParent : public UActorComponent
{
	GENERATED_BODY()

public:
	UPROPERTY(EditAnywhere)
	TArray<UMaterial> materialList;
//...

and

UCLASS()
class GAME_API UChild : public UAnomaly
{
//...

The problem is, that the child component will be not listed in the view port. The parent to but thats because he is abstract. Also is the UPROPERTY right? I want this property to be editable in the view port.

Parent Abstract

#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "Parent.generated.h"

UCLASS(Abstract, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent), Blueprintable)
class YOUR_API UParent : public UActorComponent
{
	GENERATED_BODY()

public:	

	UParent();

protected:
	virtual void BeginPlay() override;

public:	
	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

public:
	UPROPERTY(EditAnywhere)
	TArray<UMaterial*> materialList;
};


Anomaly .h

#pragma once

#include "CoreMinimal.h"
#include "Parent.h"
#include "Anomaly.generated.h"

UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent), Blueprintable)
class YOUR_API UAnomaly : public UParent
{
	GENERATED_BODY()	
};

Child .h

#pragma once

#include "CoreMinimal.h"
#include "Anomaly.h"
#include "Child.generated.h"

UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent), Blueprintable)
class YOUR_API UChild : public UAnomaly
{
	GENERATED_BODY()	
};

components

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.