You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Added a pass during compilation when node and instance data can be checked and adjusted by the node - Changed blueprint based task to copy flags to the node in Compile() - Changed relevant gameplay interaction tasks to check tags during Compile() #rb Mieszko.Zielinski #preflight 6377724cf514e1ded9a5ff44 [CL 23193668 by mikko mononen in ue5-main branch]
57 lines
1.9 KiB
C++
57 lines
1.9 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "GameplayInteractionsTypes.h"
|
|
#include "SmartObjectTypes.h"
|
|
#include "GameplayInteractionSendSlotEventTask.generated.h"
|
|
|
|
class USmartObjectSubsystem;
|
|
|
|
/**
|
|
* Task to send event to a specified Smart Object Slot based on the tasks lifetime.
|
|
*/
|
|
|
|
USTRUCT()
|
|
struct FGameplayInteractionSendSlotEventTaskInstanceData
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
/** The slot to send the event to. */
|
|
UPROPERTY(EditAnywhere, Category="Input")
|
|
FSmartObjectSlotHandle TargetSlot;
|
|
};
|
|
|
|
USTRUCT(meta = (DisplayName = "(Gameplay Interaction) Send Slot Event"))
|
|
struct FGameplayInteractionSendSlotEventTask : public FGameplayInteractionStateTreeTask
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
FGameplayInteractionSendSlotEventTask();
|
|
|
|
using FInstanceDataType = FGameplayInteractionSendSlotEventTaskInstanceData;
|
|
|
|
protected:
|
|
virtual const UStruct* GetInstanceDataType() const override { return FInstanceDataType::StaticStruct(); }
|
|
|
|
virtual bool Link(FStateTreeLinker& Linker) override;
|
|
virtual EDataValidationResult Compile(FStateTreeDataView InstanceDataView, TArray<FText>& ValidationMessages) override;
|
|
virtual EStateTreeRunStatus EnterState(FStateTreeExecutionContext& Context, const FStateTreeTransitionResult& Transition) const override;
|
|
virtual void ExitState(FStateTreeExecutionContext& Context, const FStateTreeTransitionResult& Transition) const override;
|
|
|
|
/** Tag of the event to send. */
|
|
UPROPERTY(EditAnywhere, Category = Parameter)
|
|
FGameplayTag EventTag;
|
|
|
|
/** Payload of the event to send. */
|
|
UPROPERTY(EditAnywhere, Category = Parameter)
|
|
FInstancedStruct Payload;
|
|
|
|
/** Specifies under which conditions to send the event. */
|
|
UPROPERTY(EditAnywhere, Category = Parameter)
|
|
EGameplayInteractionTaskTrigger Trigger = EGameplayInteractionTaskTrigger::OnEnterState;
|
|
|
|
/** Handle to retrieve USmartObjectSubsystem. */
|
|
TStateTreeExternalDataHandle<USmartObjectSubsystem> SmartObjectSubsystemHandle;
|
|
};
|