You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
[FYI] mikko.mononen Original CL Desc ----------------------------------------------------------------- StateTree: Added support for event payload in transitions and event capture for states. (contributed) - Transitions can now be set up to require a specific payload type and/or a gameplay tag - Required transition event payload is visible to property bindind for transition conditions - States can require an event type as enter condition, the event is captured when state is selected - Required state event payload is visible to binding for state enter conditions, tasks and transistions [CL 32113027 by bob tellez in ue5-main branch]
19 lines
615 B
C++
19 lines
615 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "StateTreeEvents.h"
|
|
#include "StateTreeTypes.h"
|
|
#include "VisualLogger/VisualLogger.h"
|
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(StateTreeEvents)
|
|
|
|
void FStateTreeEventQueue::SendEvent(const UObject* Owner, const FGameplayTag& Tag, const FConstStructView Payload, const FName Origin)
|
|
{
|
|
if (Events.Num() >= MaxActiveEvents)
|
|
{
|
|
UE_VLOG_UELOG(Owner, LogStateTree, Error, TEXT("%s: Too many events send on '%s'. Dropping event %s"), ANSI_TO_TCHAR(__FUNCTION__), *GetNameSafe(Owner), *Tag.ToString());
|
|
return;
|
|
}
|
|
|
|
Events.Emplace(Tag, Payload, Origin);
|
|
}
|