PAPER2UPaperSpriteComponent

A component that handles rendering and collision for a single instance of a UPaperSprite asset.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Paper2D

Header

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

Include

#include "PaperSpriteComponent.h"

Syntax

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

Remarks

A component that handles rendering and collision for a single instance of a UPaperSprite asset.

This component is created when you drag a sprite asset from the content browser into a Blueprint, or contained inside of the actor created when you drag one into the level.

Variables

Name Description

Protected variable UProperty Category, EditAnywhere, Meta BlueprintReadOnly

UPaperSprite &#...

 

SourceSprite

The sprite asset used by this component.

Protected variable UProperty Category, Interp BlueprintReadOnly

FLinearColor

 

SpriteColor

The color of the sprite (passed to the sprite material as a vertex color)

Constructors

Name Description

Public function

PAPER2UPaperSpriteComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual UFunction BlueprintPure, Category

UPaperSprite...

 

GetSprite()

Gets the PaperSprite used by this instance.

Public function Const

FLinearColor

 

GetSpriteColor()

Returns the current color of the sprite

Public function Const

FLinearColor

 

GetWireframeColor()

Returns the wireframe color to use for this component.

Public function Virtual UFunction BlueprintCallable, Category

bool

 

SetSprite

(
    UPaperSprite* NewSprite
)

Change the PaperSprite used by this instance.

Public function UFunction BlueprintCallable, Category

void

 

SetSpriteColor

(
    FLinearColor NewColor
)

Set color of the sprite

Public function

void

 

SetTransientTextureOverride

(
    const UTexture* TextureToModif...,
    UTexture* OverrideTexture
)

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

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.

Deprecated Variables

Name Description

Protected variable UProperty

UMaterialInterf...

 

MaterialOverride_DEPRECATED

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

See Also

UPrimitiveComponent

UPaperSprite

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