Navigation
API > API/Plugins > API/Plugins/Paper2D
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UMeshComponent
- PAPER2UPaperFlipbookComponent
References
| Module | Paper2D |
| Header | /Engine/Plugins/2D/Paper2D/Source/Paper2D/Classes/PaperFlipbookComponent.h |
| Include | #include "PaperFlipbookComponent.h" |
Syntax
UCLASS&40;ShowCategories&61;&40;Mobility, ComponentReplication&41;, ClassGroup&61;Paper2D,
Meta&61;&40;BlueprintSpawnableComponent&41;&41;
class PAPER2UPaperFlipbookComponent : public UMeshComponent
Variables
| Type | Name | Description | |
|---|---|---|---|
| float | AccumulatedTime | Current position in the timeline | |
| uint32: 1 | bLooping | Whether the flipbook should loop when it reaches the end, or stop | |
| uint32: 1 | bPlaying | Are we currently playing (moving Position) | |
| uint32: 1 | bReversePlayback | If playback should move the current position backwards instead of forwards | |
| TObjectPtr< UBodySetup > | CachedBodySetup | The cached body setup | |
| int32 | CachedFrameIndex | Last frame index calculated | |
| FFlipbookFinishedPlaySignature | OnFinishedPlaying | Event called whenever a non-looping flipbook finishes playing (either reaching the beginning or the end, depending on the play direction) | |
| float | PlayRate | Current play rate of the flipbook | |
| TObjectPtr< UPaperFlipbook > | SourceFlipbook | Flipbook currently being played | |
| FLinearColor | SpriteColor | Vertex color to apply to the frames |
Constructors
| Type | Name | Description | |
|---|---|---|---|
PAPER2UPaperFlipbookComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | |||
| UPaperFlipbook * | GetFlipbook () |
Gets the flipbook used by this instance. | |
| float | Get the nominal framerate that the flipbook will be played back at (ignoring PlayRate), in frames per second | ||
| float | Get length of the flipbook (in seconds) | ||
| int32 | Get length of the flipbook (in frames) | ||
| float | Get the current playback position (in seconds) of the flipbook | ||
| int32 | Get the current playback position (in frames) of the flipbook | ||
| float | GetPlayRate () |
Get the current play rate for this flipbook | |
| UPaperSprite * | |||
| FLinearColor | Returns the current color of the sprite | ||
| bool | IsLooping () |
Get whether we are looping or not | |
| bool | IsPlaying () |
Get whether this flipbook is playing or not. | |
| bool | IsReversing () |
Get whether we are reversing or not | |
| void | OnRep_SourceFlipbook
(
UPaperFlipbook* OldFlipbook |
||
| void | Play () |
Start playback of flipbook | |
| void | Start playback of flipbook from the start | ||
| void | Reverse () |
Start playback of flipbook in reverse | |
| void | Start playback of flipbook in reverse from the end | ||
| bool | SetFlipbook
(
UPaperFlipbook* NewFlipbook |
Change the flipbook used by this instance (will reset the play time to 0 if it is a new flipbook). | |
| void | SetLooping
(
bool bNewLooping |
True means we should loop, false means we should not. | |
| void | SetNewTime
(
float NewTime |
Set the new playback position time to use | |
| void | SetPlaybackPosition
(
float NewPosition, |
Jump to a position in the flipbook (expressed in seconds). | |
| void | SetPlaybackPositionInFrames
(
int32 NewFramePosition, |
Jump to a position in the flipbook (expressed in frames). | |
| void | SetPlayRate
(
float NewRate |
Sets the new play rate for this flipbook | |
| void | SetSpriteColor
(
FLinearColor NewColor |
Set color of the sprite | |
| void | Stop () |
Stop playback of flipbook | |
| void | TickFlipbook
(
float DeltaTime |
Overridden from UPrimitiveComponent
| Type | Name | Description | |
|---|---|---|---|
| FPrimitiveSceneProxy * | Creates a proxy to represent the primitive to the scene manager in the rendering thread. | ||
| UBodySetup * | GetBodySetup () |
Return the BodySetup to use for this PrimitiveComponent (single body case) | |
| UMaterialInterface * | GetMaterial
(
int32 ElementIndex |
Returns the material used by the element at the specified index | |
| int32 | Return number of material elements in this primitive | ||
| void | GetStreamingRenderAssetInfo
(
FStreamingTextureLevelContext& LevelContext, |
Enumerates the streaming textures/meshes used by the primitive. | |
| void | GetUsedMaterials
(
TArray< UMaterialInterface* >& OutMaterials, |
Retrieves the materials used in this component | |
| void | GetUsedTextures
(
TArray< UTexture* >& OutTextures, |
Returns the material textures used to render this primitive for the given platform. |
Overridden from USceneComponent
| Type | Name | Description | |
|---|---|---|---|
| FBoxSphereBounds | CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. | |
| bool | DoesSocketExist
(
FName InSocketName |
Return true if socket with the given name exists | |
| FTransform | GetSocketTransform
(
FName InSocketName, |
Get world-space socket transform. | |
| bool | Returns true if this component has any sockets | ||
| void | QuerySupportedSockets
(
TArray< FComponentSocketDescription >& OutSockets |
Get a list of sockets this component contains |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| const UObject * | Give a readable name for this component, including asset name if applicable | ||
| void | 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. | ||
| void | Called to send dynamic data for this component to the rendering thread | ||
| void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | Handles reading, writing, and reference collecting using FArchive. |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UMaterialInterface > | Material_DEPRECATED | DEPRECATED in 4.5: The material override for this flipbook component (if any); replaced by the Materials array inherited from UMeshComponent. |