Navigation
API > API/Plugins > API/Plugins/Paper2D
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&40;BlueprintType, Meta&61;&40;DisplayThumbnail&61;"true"&41;&41;
class PAPER2UPaperFlipbook : public UObject
Remarks
Contains an animation sequence of sprite frames
Variables
| Type | Name | Description | |
|---|---|---|---|
| TEnumAsByte< EFlipbookCollisionMode::Type > | CollisionSource | Collision source. | |
| TObjectPtr< UMaterialInterface > | DefaultMaterial | The material to use on a flipbook player instance if not overridden. | |
| float | FramesPerSecond | The nominal frame rate to play this flipbook animation back at. | |
| TArray< FPaperFlipbookKeyFrame > | KeyFrames | The set of key frames for this flipbook animation (each one has a duration and a sprite to display) |
Constructors
| Type | Name | Description | |
|---|---|---|---|
PAPER2UPaperFlipbook
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | ContainsSprite
(
UPaperSprite* SpriteAsset |
Returns true if the flipbook asset contains the specified sprite asset in any frames. | |
| bool | DoesSocketExist
(
FName SocketName |
Returns true if the flipbook has a specific named socket. | |
| bool | FindSocket
(
FName SocketName, |
Search for a socket at the specified frame. | |
| TEnumAsByte< EFlipbookCollisionMode::Type > | Returns the collision source of this flipbook animation (if any) | ||
| UMaterialInterface * | Return the default material for this flipbook. | ||
| float | Returns the nominal frame rate to play this flipbook animation back at. | ||
| const FPaperFlipbookKeyFrame & | GetKeyFrameChecked
(
int32 Index |
Returns the key frame at the specified index, make sure the index is valid before use. | |
| int32 | GetKeyFrameIndexAtTime
(
float Time, |
Returns the keyframe index that covers the specified time (in seconds), or INDEX_NONE if none exists. | |
| int32 | GetNumFrames () |
Returns the total number of frames. | |
| int32 | Returns the number of key frames. | ||
| FBoxSphereBounds | Returns the render bounds of this sprite. | ||
| UPaperSprite * | GetSpriteAtFrame
(
int32 FrameIndex |
Returns the sprite at the specified keyframe index, or nullptr if none exists. | |
| UPaperSprite * | GetSpriteAtTime
(
float Time, |
Returns the sprite at the specified time (in seconds), or nullptr if none exists. | |
| float | Returns the total duration in seconds. | ||
| bool | Returns true if the flipbook has any sockets. | ||
| void | Rebuilds cached data about the animation (such as total number of frames that the keyframes span, etc...) | ||
| bool | IsValidKeyFrameIndex
(
int32 Index |
Is the specified Index within the valid range of key frames? | |
| void | QuerySupportedSockets
(
TArray< FComponentSocketDescription >& OutSockets |
Returns a list of all of the sockets. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | Handles reading, writing, and reference collecting using FArchive. |