Navigation
API > API/Plugins > API/Plugins/Paper2D
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UMeshComponent
- PAPER2UPaperSpriteComponent
References
| Module | Paper2D |
| Header | /Engine/Plugins/2D/Paper2D/Source/Paper2D/Classes/PaperSpriteComponent.h |
| Include | #include "PaperSpriteComponent.h" |
Syntax
UCLASS&40;ShowCategories&61;&40;Mobility&41;, ClassGroup&61;Paper2D, Meta&61;&40;BlueprintSpawnableComponent&41;&41;
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
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UPaperSprite > | SourceSprite | The sprite asset used by this component. | |
| FLinearColor | SpriteColor | The color of the sprite (passed to the sprite material as a vertex color) |
Constructors
| Type | Name | Description | |
|---|---|---|---|
PAPER2UPaperSpriteComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UPaperSprite * | GetSprite () |
Gets the PaperSprite used by this instance. | |
| FLinearColor | Returns the current color of the sprite | ||
| FLinearColor | Returns the wireframe color to use for this component. | ||
| bool | SetSprite
(
UPaperSprite* NewSprite |
Change the PaperSprite used by this instance. | |
| void | SetSpriteColor
(
FLinearColor NewColor |
Set color of the sprite | |
| void | SetTransientTextureOverride
(
const UTexture* TextureToModifyOverrideFor, |
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 |
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. |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UMaterialInterface > | 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
UPaperSprite