PAPER2UPaperFlipbook

Contains an animation sequence of sprite frames

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

PAPER2UPaperFlipbook

References

Module

Paper2D

Header

/Engine/Plugins/2D/Paper2D/Source/Paper2D/Classes/PaperFlipbook.h

Include

#include "PaperFlipbook.h"

Syntax

UCLASS(BlueprintType, Meta=(DisplayThumbnail="true"))
class PAPER2UPaperFlipbook : public UObject

Remarks

Contains an animation sequence of sprite frames

Variables

Name Description

Protected variable UProperty Category, EditAnywhere BlueprintReadOnly

TEnumAsByte< EF...

 

CollisionSource

Collision source.

Protected variable UProperty Category, EditAnywhere BlueprintReadOnly

TObjectPtr< UMa...

 

DefaultMaterial

The material to use on a flipbook player instance if not overridden.

Protected variable UProperty Category, EditAnywhere, Meta BlueprintReadOnly

float

 

FramesPerSecond

The nominal frame rate to play this flipbook animation back at.

Protected variable UProperty Category, EditAnywhere

TArray< FPaperF...

 

KeyFrames

The set of key frames for this flipbook animation (each one has a duration and a sprite to display)

Constructors

Name Description

Public function

PAPER2UPaperFlipbook

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

bool

 

ContainsSprite

(
    UPaperSprite* SpriteAsset
)

Returns true if the flipbook asset contains the specified sprite asset in any frames.

Public function Const

bool

 

DoesSocketExist

(
    FName SocketName
)

Returns true if the flipbook has a specific named socket.

Public function

bool

 

FindSocket

(
    FName SocketName,
    int32 KeyFrameIndex,
    FTransform& OutLocalTransform
)

Search for a socket at the specified frame.

Public function Const

TEnumAsByte<...

 

GetCollisionSource()

Returns the collision source of this flipbook animation (if any)

Public function Const

UMaterialInt...

 

GetDefaultMaterial()

Return the default material for this flipbook.

Public function Const

float

 

GetFramesPerSecond()

Returns the nominal frame rate to play this flipbook animation back at.

Public function Const

const FPaper...

 

GetKeyFrameChecked

(
    int32 Index
)

Returns the key frame at the specified index, make sure the index is valid before use.

Public function Const UFunction BlueprintCallable, Category

int32

 

GetKeyFrameIndexAtTime

(
    float Time,
    bool bClampToEnds
)

Returns the keyframe index that covers the specified time (in seconds), or INDEX_NONE if none exists.

Public function Const UFunction BlueprintCallable, Category

int32

 

GetNumFrames()

Returns the total number of frames.

Public function Const UFunction BlueprintCallable, Category

int32

 

GetNumKeyFrames()

Returns the number of key frames.

Public function Const

FBoxSphereBo...

 

GetRenderBounds()

Returns the render bounds of this sprite.

Public function Const UFunction BlueprintCallable, Category

UPaperSprite...

 

GetSpriteAtFrame

(
    int32 FrameIndex
)

Returns the sprite at the specified keyframe index, or nullptr if none exists.

Public function Const UFunction BlueprintCallable, Category

UPaperSprite...

 

GetSpriteAtTime

(
    float Time,
    bool bClampToEnds
)

Returns the sprite at the specified time (in seconds), or nullptr if none exists.

Public function Const UFunction BlueprintCallable, Category

float

 

GetTotalDuration()

Returns the total duration in seconds.

Public function Const

bool

 

HasAnySockets()

Returns true if the flipbook has any sockets.

Public function

void

 

InvalidateCachedData()

Rebuilds cached data about the animation (such as total number of frames that the keyframes span, etc...)

Public function Const UFunction BlueprintCallable, Category

bool

 

IsValidKeyFrameIndex

(
    int32 Index
)

Is the specified Index within the valid range of key frames?

Public function Const

void

 

QuerySupportedSockets

Returns a list of all of the sockets.

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.