Files
yoan stamant 6d66e2376c [StateTree] moved some types to the execution types header
#rb mikko.mononen

[CL 26255567 by yoan stamant in 5.3 branch]
2023-06-27 09:09:35 -04:00

43 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "StateTreeSchema.h"
#include "GameFramework/Actor.h"
#include "StateTreeExecutionTypes.h"
#include "StateTreeComponentSchema.generated.h"
/**
* StateTree for Actors with StateTree component.
*/
UCLASS(BlueprintType, EditInlineNew, CollapseCategories, meta = (DisplayName = "StateTree Component", CommonSchema))
class GAMEPLAYSTATETREEMODULE_API UStateTreeComponentSchema : public UStateTreeSchema
{
GENERATED_BODY()
public:
UStateTreeComponentSchema();
UClass* GetContextActorClass() const { return ContextActorClass; };
protected:
virtual bool IsStructAllowed(const UScriptStruct* InScriptStruct) const override;
virtual bool IsClassAllowed(const UClass* InScriptStruct) const override;
virtual bool IsExternalItemAllowed(const UStruct& InStruct) const override;
virtual TConstArrayView<FStateTreeExternalDataDesc> GetContextDataDescs() const override;
virtual void PostLoad() override;
#if WITH_EDITOR
virtual void PostEditChangeChainProperty(FPropertyChangedChainEvent& PropertyChangedEvent) override;
#endif // WITH_EDITOR
/** Actor class the StateTree is expected to run on. Allows to bind to specific Actor class' properties. */
UPROPERTY(EditAnywhere, Category="Defaults")
TSubclassOf<AActor> ContextActorClass;
UPROPERTY()
FStateTreeExternalDataDesc ContextActorDataDesc;
};