You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- 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 32082269 by mikko mononen in ue5-main branch]
33 lines
1.1 KiB
C++
33 lines
1.1 KiB
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)
|
|
|
|
//----------------------------------------------------------------//
|
|
// FStateTreeSharedEvent
|
|
//----------------------------------------------------------------//
|
|
|
|
void FStateTreeSharedEvent::AddStructReferencedObjects(FReferenceCollector& Collector)
|
|
{
|
|
Collector.AddPropertyReferencesWithStructARO(FStateTreeEvent::StaticStruct(), Event.Get());
|
|
}
|
|
|
|
|
|
//----------------------------------------------------------------//
|
|
// FStateTreeEventQueue
|
|
//----------------------------------------------------------------//
|
|
|
|
void FStateTreeEventQueue::SendEvent(const UObject* Owner, const FGameplayTag& Tag, const FConstStructView Payload, const FName Origin)
|
|
{
|
|
if (SharedEvents.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;
|
|
}
|
|
|
|
SharedEvents.Emplace(Tag, Payload, Origin);
|
|
}
|