Files
UnrealEngineUWP/Engine/Plugins/Runtime/GameplayStateTree/Source/GameplayStateTreeModule/Public/Components/StateTreeComponentSchema.h
mikko mononen 0d47d49765 StateTree: Context Objects
- Cleaned up Blueprint nodes from deprecated functions
- Added call guards for BP implemented events on BP nodes
- Renamed Named External Data to Context (Object/Data)
- Added automatic binding for Context objects
- Added UI visualization for Context properties and cleaned up the Input/Ouput visualization
- Added compiler errors for missing Input and Context properties

#jira UE-156544 UE-147509
#rb Stephen.Holmes

[CL 22084585 by mikko mononen in ue5-main branch]
2022-09-19 19:47:11 -04:00

43 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "StateTreeSchema.h"
#include "GameFramework/Actor.h"
#include "Templates/SubclassOf.h"
#include "StateTreeComponentSchema.generated.h"
/**
* StateTree for Actors with StateTree component.
*/
UCLASS(BlueprintType, EditInlineNew, CollapseCategories, meta = (DisplayName = "StateTree Component", CommonSchema))
class 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;
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;
};