Navigation
API > API/Runtime > API/Runtime/Engine
Used to describe an element that can be linked to a segment in a montage or sequence. Usage: Inherit from FAnimLinkableElement and make sure to call LinkMontage or LinkSequence both on creation and on loading the element. From there SetTime and GetTime should be used to control where this element is in the montage or sequence.
For more advanced usage, see this implementation used in FAnimNotifyEvent where we have a secondary link to handle a duration
| Name | FAnimLinkableElement |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Classes/Animation/AnimLinkableElement.h |
| Include Path | #include "Animation/AnimLinkableElement.h" |
Syntax
USTRUCT ()
struct FAnimLinkableElement
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnimLinkableElement() |
Animation/AnimLinkableElement.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FAnimLinkableElement() |
Animation/AnimLinkableElement.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ChangeLinkMethod
(
EAnimLinkMethod::Type NewLinkMethod |
Changes the way this element is linked to its segment | Animation/AnimLinkableElement.h | |
void ChangeSlotIndex
(
int32 NewSlotIndex |
Change the montage slot that this element is linked to | Animation/AnimLinkableElement.h | |
void Clear() |
Clear the linking information from this element, leaves montage link intact | Animation/AnimLinkableElement.h | |
bool ConditionalRelink() |
Relinks this element if internal state requires relinking | Animation/AnimLinkableElement.h | |
const UAnimMontage * GetLinkedMontage() |
Gets the Montage this element is linked to, if any | Animation/AnimLinkableElement.h | |
const UAnimSequenceBase * GetLinkedSequence() |
Gets the sequence this element is linked to | Animation/AnimLinkableElement.h | |
EAnimLinkMethod::Type GetLinkMethod() |
Get the method used to link this element to its segment | Animation/AnimLinkableElement.h | |
int32 GetSegmentIndex() |
Get the index of the segment this element is currently linked to | Animation/AnimLinkableElement.h | |
int32 GetSlotIndex() |
Get the slot index this element is currently linked to | Animation/AnimLinkableElement.h | |
float GetTime
(
EAnimLinkMethod::Type ReferenceFrame |
Gets the current time for this element | Animation/AnimLinkableElement.h | |
void Link
(
UAnimSequenceBase* AnimSequenceBase, |
Link this element to an animation object (Sequence or Montage) | Animation/AnimLinkableElement.h | |
void LinkMontage
(
UAnimMontage* Montage, |
Link this element to a montage | Animation/AnimLinkableElement.h | |
void LinkSequence
(
UAnimSequenceBase* Sequence, |
Link this element to a Sequence, Just setting basic data as sequences don't need full linking | Animation/AnimLinkableElement.h | |
void OnChanged
(
float NewMontageTime |
Called when the properties of this element are changed | Animation/AnimLinkableElement.h | |
void RefreshSegmentOnLoad() |
Refreshes the current segment data (Begin time, length etc.) and validate the link time Intended to update the internal state when segment lengths/times could have changed | Animation/AnimLinkableElement.h | |
void SetSegmentIndex
(
int32 NewSegmentIndex |
Directly sets segment index | Animation/AnimLinkableElement.h | |
virtual void SetTime
(
float NewTime, |
Sets the time of this element | Animation/AnimLinkableElement.h | |
void Update () |
Update the timing information for this element. | Animation/AnimLinkableElement.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnimSegment * GetSegmentAtCurrentTime() |
Gets the segment in the current montage in the current slot that is at the time of this element | Animation/AnimLinkableElement.h |