// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Abilities/GameplayAbility.h" #include "InteractionOption.h" #include "IInteractableTarget.generated.h" struct FInteractionQuery; /** */ class FInteractionOptionBuilder { public: FInteractionOptionBuilder(TScriptInterface InterfaceTargetScope, TArray& InteractOptions) : Scope(InterfaceTargetScope) , Options(InteractOptions) { } void AddInteractionOption(const FInteractionOption& Option) { FInteractionOption& OptionEntry = Options.Add_GetRef(Option); OptionEntry.InteractableTarget = Scope; } private: TScriptInterface Scope; TArray& Options; }; /** */ UINTERFACE(MinimalAPI, meta = (CannotImplementInterfaceInBlueprint)) class UInteractableTarget : public UInterface { GENERATED_BODY() }; /** */ class IInteractableTarget { GENERATED_BODY() public: /** */ virtual void GatherInteractionOptions(const FInteractionQuery& InteractQuery, FInteractionOptionBuilder& OptionBuilder) = 0; /** */ virtual void CustomizeInteractionEventData(const FGameplayTag& InteractionEventTag, FGameplayEventData& InOutEventData) { } };