PAPER2UPaperFlipbookComponent

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Paper2D

Header

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

Include

#include "PaperFlipbookComponent.h"

Syntax

UCLASS(ShowCategories=(Mobility, ComponentReplication), ClassGroup=Paper2D,
       Meta=(BlueprintSpawnableComponent))
class PAPER2UPaperFlipbookComponent : public UMeshComponent

Variables

Name Description

Protected variable UProperty

float

 

AccumulatedTime

Current position in the timeline

Protected variable UProperty

uint32: 1

 

bLooping

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

Protected variable UProperty

uint32: 1

 

bPlaying

Are we currently playing (moving Position)

Protected variable UProperty

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

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

PAPER2UPaperFlipbookComponent

(
    const FObjectInitializer& ObjectIn...
)

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 Const 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 Const UFunction BlueprintCallable, Category

float

 

GetFlipbookLength()

Get length of the flipbook (in seconds)

Public function Const UFunction BlueprintCallable, Category

int32

 

GetFlipbookLengthInFrames()

Get length of the flipbook (in frames)

Public function Const UFunction BlueprintCallable, Category

float

 

GetPlaybackPosition()

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

Public function Const UFunction BlueprintCallable, Category

int32

 

GetPlaybackPositionInFrames()

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

Public function Const UFunction BlueprintCallable, Category

float

 

GetPlayRate()

Get the current play rate for this flipbook

Protected function Const

UPaperSprite...

 

GetSpriteAtCachedIndex()

Public function Const UFunction BlueprintCallable, Category

bool

 

IsLooping()

Get whether we are looping or not

Public function Const UFunction BlueprintCallable, Category

bool

 

IsPlaying()

Get whether this flipbook is playing or not.

Public function Const 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()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Public function Virtual

UBodySetup &...

 

GetBodySetup()

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

Public function Virtual Const

UMaterialInt...

 

GetMaterial

(
    int32 ElementIndex
)

Returns the material used by the element at the specified index

Public function Virtual Const

int32

 

GetNumMaterials()

Return number of material elements in this primitive

Public function Virtual Const

void

 

GetStreamingRenderAssetInfo

Enumerates the streaming textures/meshes used by the primitive.

Public function Virtual Const

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 Const

FBoxSphereBo...

 

CalcBounds

(
    const FTransform& LocalToWorld
)

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

Public function Virtual Const

bool

 

DoesSocketExist

(
    FName InSocketName
)

Return true if socket with the given name exists

Public function Virtual Const

FTransform

 

GetSocketTransform

(
    FName InSocketName,
    ERelativeTransformSpace TransformSp...
)

Get world-space socket transform.

Public function Virtual Const

bool

 

HasAnySockets()

Returns true if this component has any sockets

Public function Virtual Const

void

 

QuerySupportedSockets

Get a list of sockets this component contains

Overridden from UActorComponent

Name Description

Public function Virtual Const

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...
)

Function called every frame on this ActorComponent.

Overridden from UObject

Name Description

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.

Deprecated Variables

Name Description

Protected variable UProperty

UMaterialInterf...

 

Material_DEPRECATED

DEPRECATED in 4.5: The material override for this flipbook component (if any); replaced by the Materials array inherited from UMeshComponent.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback