I have a game I am porting to ue4. I have an Actor class that has a series of states for the state machine such as FlyState, DeadState etc… with the base class called ActorState
in my Actor class I have a list of these classes.
I’m trying to get this working in ue4 such that the states can be added to the array in the editor.
So I have something like:
UCLASS()
class DOGFIGHTS_API AGActor : public AActor
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GActor")
TArray<UActorState*> ActorStateList;
};
UCLASS(abstract, BlueprintType, Blueprintable)
class DOGFIGHTS_API UActorState : public UObject
{
GENERATED_BODY()
public:
};
UCLASS()
class DOGFIGHTS_API UDeadState : public UActorState
{
GENERATED_BODY()
public:
};
this compiles fine. In the editor I can see ActorStateArray as a list in the editor, but I cant see DeadState to be able to put into the array element.
Is what I am wanting do-able? Or have I made some mistake?