2022-05-02 09:15:14 -04:00
|
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "StateTreeSchema.h"
|
2022-08-29 14:49:38 -04:00
|
|
|
|
#include "GameFramework/Actor.h"
|
2023-06-27 09:09:35 -04:00
|
|
|
|
#include "StateTreeExecutionTypes.h"
|
2022-05-02 09:15:14 -04:00
|
|
|
|
#include "StateTreeComponentSchema.generated.h"
|
|
|
|
|
|
|
2022-07-01 04:36:16 -04:00
|
|
|
|
/**
|
|
|
|
|
|
* StateTree for Actors with StateTree component.
|
|
|
|
|
|
*/
|
|
|
|
|
|
UCLASS(BlueprintType, EditInlineNew, CollapseCategories, meta = (DisplayName = "StateTree Component", CommonSchema))
|
2023-03-24 07:57:37 -04:00
|
|
|
|
class GAMEPLAYSTATETREEMODULE_API UStateTreeComponentSchema : public UStateTreeSchema
|
2022-05-02 09:15:14 -04:00
|
|
|
|
{
|
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
2022-08-29 14:47:43 -04:00
|
|
|
|
public:
|
|
|
|
|
|
UStateTreeComponentSchema();
|
|
|
|
|
|
|
|
|
|
|
|
UClass* GetContextActorClass() const { return ContextActorClass; };
|
|
|
|
|
|
|
2022-05-02 09:15:14 -04:00
|
|
|
|
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;
|
2022-08-29 14:47:43 -04:00
|
|
|
|
|
2023-06-27 09:09:35 -04:00
|
|
|
|
virtual TConstArrayView<FStateTreeExternalDataDesc> GetContextDataDescs() const override;
|
2022-08-29 14:47:43 -04:00
|
|
|
|
|
2022-09-05 09:08:59 -04:00
|
|
|
|
virtual void PostLoad() override;
|
|
|
|
|
|
|
2022-08-29 14:47:43 -04:00
|
|
|
|
#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;
|
2022-05-02 09:15:14 -04:00
|
|
|
|
};
|