Hi all,
I created this class:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "State.generated.h"
UCLASS(Blueprintable, ClassGroup=FSM, meta=(BlueprintSpawnableComponent))
class BASIC_BLOCKED_GAME_API UState : public UObject
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
void Enter();
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
void Update();
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
void Exit();
};
and then created a blueprint from it like this:
then I created this class:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "State.h"
#include "Components/ActorComponent.h"
#include "StateMachine.generated.h"
UCLASS( ClassGroup=(FSM), meta=(BlueprintSpawnableComponent) )
class BASIC_BLOCKED_GAME_API UStateMachine : public UActorComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UStateMachine();
private:
UPROPERTY(EditAnywhere)
UState* CurrentState;
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
void Initialize(UState* InitialState);
void ChangeState(UState* NewState);
};
and added it as a component to an actor like this:
and in it, I can see the variables as you can see here:
but when I open the dropdown I can’t find the blueprint I created beforehand as you can see here:
Why does this happen what am I doing wrong or do not understand right?