Navigation
API > API/Plugins > API/Plugins/UAF
Trait Event
Encapsulates an event in the trait system. Events can be marked as handled to signal to future handlers that no further action needs to be taken. Consuming an event prevents it from propagating to other handlers.
| Name | FAnimNextTraitEvent |
| Type | struct |
| Header File | /Engine/Plugins/Experimental/UAF/UAF/Source/UAF/Public/TraitCore/TraitEvent.h |
| Include Path | #include "TraitCore/TraitEvent.h" |
Syntax
USTRUCT (BlueprintType )
struct FAnimNextTraitEvent
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnimNextTraitEvent
(
UE::UAF::FTraitEventLifetime InLifetime |
Creates an event of the specified type and associated lifetime. | TraitCore/TraitEvent.h | |
| Creates a transient event. | TraitCore/TraitEvent.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FAnimNextTraitEvent() |
Allow typesafe destruction of derived types. | TraitCore/TraitEvent.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsConsumed | int8 | Signals whether someone consumed this event and it thus shouldn't be forwarded to other handlers. | TraitCore/TraitEvent.h | |
| bIsHandled | int8 | Signals whether someone has opted to handle this event. | TraitCore/TraitEvent.h | |
| Lifetime | UE::UAF::FTraitEventLifetime | The specified lifetime of this event. | TraitCore/TraitEvent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const EventType * AsType () |
Returns a pointer to this event cast to the specified type if the TypeUIDs match, nullptr otherwise. | TraitCore/TraitEvent.h | |
EventType * AsType () |
Returns a pointer to this event cast to the specified type if the TypeUIDs match, nullptr otherwise. | TraitCore/TraitEvent.h | |
bool DecrementLifetime
(
UE::UAF::FTraitEventList& OutputEventList |
Decrements the lifetime count and returns whether or not this event has expired in the process OnExpired will be called on the derived type if we expire and new output events can be appended | TraitCore/TraitEvent.h | |
UE::UAF::FTraitEventLifetime GetLifetime() |
Returns the lifetime of this event. | TraitCore/TraitEvent.h | |
virtual UE::UAF::FTraitEventUID GetTypeUID() |
Returns the event type UID. | TraitCore/TraitEvent.h | |
bool IsA () |
Returns whether or not this event derives from the specified type. | TraitCore/TraitEvent.h | |
virtual bool IsA
(
UE::UAF::FTraitEventUID InTypeUID |
Returns whether or not this event derives from the specified type. | TraitCore/TraitEvent.h | |
bool IsConsumed() |
Returns whether or not this event has been consumed by a previous handler. | TraitCore/TraitEvent.h | |
bool IsExpired() |
Returns whether or not this event has expired. | TraitCore/TraitEvent.h | |
bool IsHandled() |
Returns whether or not this event has been handled by a previous handler. | TraitCore/TraitEvent.h | |
bool IsInfinite() |
Returns whether or not this event has infinite duration. | TraitCore/TraitEvent.h | |
bool IsTransient() |
Returns whether or not this event has transient duration. | TraitCore/TraitEvent.h | |
bool IsValid() |
Returns whether or not this event is valid An event is valid if it hasn't been consumed and if it isn't expired | TraitCore/TraitEvent.h | |
bool MarkConsumed () |
Marks this event as being consumed. | TraitCore/TraitEvent.h | |
bool MarkHandled () |
Marks this event as being handled. | TraitCore/TraitEvent.h | |
void SetLifetime
(
UE::UAF::FTraitEventLifetime InLifetime |
Sets the desired lifetime for this event. | TraitCore/TraitEvent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnExpired
(
UE::UAF::FTraitEventList& OutputEventList |
Called when an events' lifetime expires. | TraitCore/TraitEvent.h |