You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Moved event queue to it's own struct - Changed the SendEvent() API to accept struct view to prevent instanced struct copy in common cases - Fixed event handling in case EnterState() fails. - Added option for Tasks to disavble ticking, or to be ticked only when there are events - Added option for Tasks handle when properties are copied - Changed DebugText to use external Actor reference - Changed DelayTask to use the new GetInstanceData which does not need type - Added TStateTreeInstanceDataStructRef which can be used to access struct instance data in delegates #rb Maxime.Mercier Luciano.Ferraro #preflight 6360dd302b5338aceb2d0343 [CL 22888708 by mikko mononen in ue5-main branch]
16 lines
558 B
C++
16 lines
558 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "StateTreeEvents.h"
|
|
#include "StateTreeTypes.h"
|
|
#include "VisualLogger/VisualLogger.h"
|
|
|
|
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);
|
|
} |