Language:
Discover
By Skill Level
By Category

UPaperFlipbookComponent

Choose your OS:

Inheritance Hierarchy

Syntax

UCLASS ([ShowCategories=(Mobility, ComponentReplication)](Programming/UnrealArchitecture/Reference/Classes/Specifiers/ShowCategories), [ClassGroup=Paper2D](Programming/UnrealArchitecture/Reference/Classes/Specifiers/ClassGroup),
       Meta=(BlueprintSpawnableComponent))
class UPaperFlipbookComponent : public UMeshComponent

Variables

Name Description

Protected variable UProperty Replicated

float

 

AccumulatedTime

Current position in the timeline

Protected variable UProperty Replicated

uint32 : 1

 

bLooping

Whether the flipbook should loop when it reaches the end, or stop

Protected variable UProperty Replicated

uint32 : 1

 

bPlaying

Are we currently playing (moving Position)

Protected variable UProperty Replicated

uint32 : 1

 

bReversePlayback

If playback should move the current position backwards instead of forwards

Protected variable UProperty Transient

UBodySetup *...

 

CachedBodySetup

The cached body setup

Protected variable UProperty

int32

 

CachedFrameIndex

Last frame index calculated

Public variable UProperty BlueprintAssignable

FFlipbookFinish ...

 

OnFinishedPlaying

Event called whenever a non-looping flipbook finishes playing (either reaching the beginning or the end, depending on the play direction)

Protected variable UProperty Category, EditAnywhere Replicated

float

 

PlayRate

Current play rate of the flipbook

Protected variable UProperty Category, EditAnywhere, Meta replicatedusing

UPaperFlipbook ...

 

SourceFlipbook

Flipbook currently being played

Protected variable UProperty Category, Interp BlueprintReadOnly

FLinearColor

 

SpriteColor

Vertex color to apply to the frames

Constructors

Name Description

Public function

UPaperFlipbookComponent

(
    const FObjectInitializer & ObjectIn...
)

UPaperFlipbookComponent .

Functions

Name Description

Protected function

void

 

CalculateCurrentFrame()

Protected function

void

 

FlipbookChangedPhysicsState()

Public function Virtual UFunction BlueprintPure, Category

UPaperFlipbo ...

 

GetFlipbook()

Gets the flipbook used by this instance.

Public function UFunction BlueprintCallable, Category

float

 

GetFlipbookFramerate()

Get the nominal framerate that the flipbook will be played back at (ignoring PlayRate), in frames per second

Public function UFunction BlueprintCallable, Category

float

 

GetFlipbookLength()

Get length of the flipbook (in seconds)

Public function UFunction BlueprintCallable, Category

int32

 

GetFlipbookLengthInFrames()

Get length of the flipbook (in frames)

Public function UFunction BlueprintCallable, Category

float

 

GetPlaybackPosition()

Get the current playback position (in seconds) of the flipbook

Public function UFunction BlueprintCallable, Category

int32

 

GetPlaybackPositionInFrames()

Get the current playback position (in frames) of the flipbook

Public function UFunction BlueprintCallable, Category

float

 

GetPlayRate()

Get the current play rate for this flipbook

Protected function

UPaperSprite ...

 

GetSpriteAtCachedIndex()

Public function UFunction BlueprintCallable, Category

bool

 

IsLooping()

Get whether we are looping or not

Public function UFunction BlueprintCallable, Category

bool

 

IsPlaying()

Get whether this flipbook is playing or not.

Public function UFunction BlueprintCallable, Category

bool

 

IsReversing()

Get whether we are reversing or not

Protected function UFunction

void

 

OnRep_SourceFlipbook

(
    UPaperFlipbook * OldFlipbook
)

Public function UFunction BlueprintCallable, Category

void

 

Play()

Start playback of flipbook

Public function UFunction BlueprintCallable, Category

void

 

PlayFromStart()

Start playback of flipbook from the start

Public function UFunction BlueprintCallable, Category

void

 

Reverse()

Start playback of flipbook in reverse

Public function UFunction BlueprintCallable, Category

void

 

ReverseFromEnd()

Start playback of flipbook in reverse from the end

Public function Virtual UFunction BlueprintCallable, Category

bool

 

SetFlipbook

(
    UPaperFlipbook * NewFlipbook
)

Change the flipbook used by this instance (will reset the play time to 0 if it is a new flipbook).

Public function UFunction BlueprintCallable, Category

void

 

SetLooping

(
    bool bNewLooping
)

True means we should loop, false means we should not.

Public function UFunction BlueprintCallable, Category

void

 

SetNewTime

(
    float NewTime
)

Set the new playback position time to use

Public function UFunction BlueprintCallable, Category

void

 

SetPlaybackPosition

(
    float NewPosition,
    bool bFireEvents
)

Jump to a position in the flipbook (expressed in seconds).

Public function UFunction BlueprintCallable, Category

void

 

SetPlaybackPositionInFrames

(
    int32 NewFramePosition,
    bool bFireEvents
)

Jump to a position in the flipbook (expressed in frames).

Public function UFunction BlueprintCallable, Category

void

 

SetPlayRate

(
    float NewRate
)

Sets the new play rate for this flipbook

Public function UFunction BlueprintCallable, Category

void

 

SetSpriteColor

(
    FLinearColor NewColor
)

Set color of the sprite

Public function UFunction BlueprintCallable, Category

void

 

Stop()

Stop playback of flipbook

Protected function

void

 

TickFlipbook

(
    float DeltaTime
)

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc ...

 

CreateSceneProxy()

End of USceneComponent interface.

Public function Virtual

UBodySetup &...

 

GetBodySetup()

Return the BodySetup to use for this PrimitiveComponent (single body case)

Public function Virtual

UMaterialInt ...

 

GetMaterial

(
    int32 ElementIndex
)

Returns the material used by the element at the specified index

Public function Virtual

int32

 

GetNumMaterials()

Number of material elements in this primitive

Public function Virtual

void

 

GetStreamingTextureInfo

Enumerates the streaming textures used by the primitive.

Public function Virtual

void

 

GetUsedMaterials

(
    TArray < UMaterialInterface * > ...,
    bool bGetDebugMaterials
)

Retrieves the materials used in this component

Public function Virtual

void

 

GetUsedTextures

(
    TArray < UTexture * >& OutTextu...,
    EMaterialQualityLevel::Type Quality...
)

Returns the material textures used to render this primitive for the given platform.

Overridden from USceneComponent

Name Description

Public function Virtual

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Public function Virtual

bool

 

DoesSocketExist

(
    FName InSocketName
)

Return true if socket with the given name exists

Public function Virtual

FTransform

 

GetSocketTransform

(
    FName InSocketName,
    ERelativeTransformSpace TransformSp...
)

Get world-space socket transform.

Public function Virtual

bool

 

HasAnySockets()

End of UActorComponent interface.

Public function Virtual

void

 

QuerySupportedSockets

Get a list of sockets this component contains

Overridden from UActorComponent

Name Description

Public function Virtual

const UObjec ...

 

AdditionalStatObject()

Give a readable name for this component, including asset name if applicable

Public function Virtual

void

 

CheckForErrors()

Function that gets called from within Map_Check to allow this actor component to check itself for any potential errors and register them with map check dialog.

Public function Virtual

void

 

SendRenderDynamicData_Concurrent()

Called to send dynamic data for this component to the rendering thread

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction * T...
)

End of UObject interface.

Overridden from UObject

Name Description

Public function Virtual

void

 

PostLoad()

WITH_EDITOR.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject interface.

References

Module

Paper2D