I’m getting this error trying to run StateTreeAI Component:
“Error: UStateTreeComponentSchema::SetContextRequirements: Missing external data requirements. StateTree will not update.”
The CPP code has nothing and as well the state tree is nothing but just a Debug Text task. and State tree is run from `bStartLogicAutomatically`
ANeoNpcCharacter::ANeoNpcCharacter()
{
PrimaryActorTick.bCanEverTick = false;
AutoPossessAI = EAutoPossessAI::PlacedInWorldOrSpawned;
AIControllerClass = ANeoNpcAIController::StaticClass();
StateTreeAI = CreateDefaultSubobject<UStateTreeAIComponent>(TEXT("StateTreeAI"));
StateTreeAI->SetStartLogicAutomatically(true);
}
void ANeoNpcCharacter::PossessedBy(AController* NewController)
{
Super::PossessedBy(NewController);
if (ANeoNpcAIController* AIC = Cast<ANeoNpcAIController>(NewController))
{
NpcAIController = AIC;
}
}
UCLASS()
class NEORAM_API ANeoNpcCharacter : public ANeoBaseCharacter
{
GENERATED_BODY()
public:
ANeoNpcCharacter();
protected:
virtual void PossessedBy(AController* NewController) override;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "NeoRam|AI")
UStateTreeAIComponent* StateTreeAI;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "NeoRam|AI")
ANeoNpcAIController* NpcAIController;
};
// class NEORAM_API ANeoBaseCharacter : public APaperZDCharacter
UCLASS()
class NEORAM_API ANeoWifeCharacter : public ANeoNpcCharacter
{
GENERATED_BODY()
public:
ANeoWifeCharacter();
/** Configures whether the character is sleeping and adjusts sprite orientation accordingly */
UFUNCTION(BlueprintCallable, Category = "Cutscene")
void SetSleepingState(bool bNewSleeping, bool bFaceLeft);
protected:
virtual void BeginPlay() override;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Cutscene|Setup")
bool bStartSleeping = true;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Cutscene|Setup")
bool bSleepFacingLeft = false;
};
I really appreciate your help. thanks

