| UObjectBase
|
Module |
|
Header |
/Engine/Plugins/2D/Paper2D/Source/Paper2D/Classes/PaperSprite.h |
Include |
#include "PaperSprite.h" |
[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(BlueprintType, Meta=(DisplayThumbnail="true"))
class PAPER2UPaperSprite :
public UObject,
public IInterface_CollisionDataProvider,
public ISlateTextureAtlasInterface
Sprite Asset
Stores the data necessary to render a single 2D sprite (from a region of a texture) Can also contain collision shapes for the sprite.
Name | Description | ||
---|---|---|---|
|
AdditionalSourceTextures |
Additional source textures for other slots. |
|
|
AlternateMaterial |
The alternate material to use on a sprite instance if not overridden (this is only used for Diced render geometry, and will be the opaque material in that case, slot 1) |
|
|
AlternateMaterialSplitIndex |
The point at which the alternate material takes over in the baked render data (or INDEX_NONE) |
|
|
AtlasGroup |
Spritesheet group that this sprite belongs to. |
|
|
BakedRenderData |
Baked render data (triangle vertices, stored as XY UV tuples) XY is the XZ position in world space, relative to the pivot UV is normalized (0..1) There should always be a multiple of three elements in this array |
|
|
BakedSourceDimension |
Dimensions within BakedSourceTexture (in pixels) |
|
|
UTexture2D *... |
BakedSourceTexture |
|
|
BakedSourceUV |
Position within BakedSourceTexture (in pixels) |
|
|
UBodySetup *... |
BodySetup |
Baked physics data. |
|
bRotatedInSourceImage |
This texture is rotated in the atlas. |
|
|
bSnapPivotToPixelGrid |
Should the pivot be snapped to a pixel boundary? |
|
|
bTrimmedInSourceImage |
This texture is trimmed, consider the values above. |
|
|
FSpriteGeometry... |
CollisionGeometry |
Custom collision geometry polygons (in texture space) |
|
float |
CollisionThickness |
The extrusion thickness of collision geometry when using a 3D collision domain. |
|
CustomPivotPoint |
Custom pivot point (relative to the sprite rectangle) |
|
|
DefaultMaterial |
The material to use on a sprite instance if not overridden (this is the default material when only one is being used, and is the translucent/masked material for Diced render geometry, slot 0) |
|
|
OriginInSourceImageBeforeTrimming |
Origin within SourceImage, prior to atlasing. |
|
|
TEnumAsByte< ES... |
PivotMode |
Pivot mode. |
|
float |
PixelsPerUnrealUnit |
The scaling factor between pixels and Unreal units (cm) (e.g., 0.64 would make a 64 pixel wide sprite take up 100 cm) |
|
TSoftObjectPtr<... |
PreviousAtlasGroup |
The previous spritesheet group this belonged to To make sure we remove ourselves from it if changed or nulled out |
|
FSpriteGeometry... |
RenderGeometry |
Custom render geometry polygons (in texture space) |
|
Sockets |
List of sockets on this sprite. |
|
|
SourceDimension |
Dimensions within SourceTexture (in pixels) |
|
|
SourceImageDimensionBeforeTrimming |
Dimensions of SourceImage. |
|
|
TSoftObjectPtr<... |
SourceTexture |
The source texture that the sprite comes from. |
|
UTexture2D *... |
SourceTextureCacheNeverSerialized |
|
|
SourceTextureDimension |
Dimension of the texture when this sprite was created Used when the sprite is resized at some point |
|
|
SourceUV |
Position within SourceTexture (in pixels) |
|
|
TEnumAsByte< ES... |
SpriteCollisionDomain |
Collision domain (no collision, 2D, or 3D) |
Name | Description | |
---|---|---|
|
PAPER2UPaperSprite ( |
Name | Description | ||
---|---|---|---|
|
BuildGeometryFromContours ( |
||
|
ConvertPivotSpaceToTextureSpace ( |
||
|
ConvertPivotSpaceToTextureSpace ( |
||
|
ConvertTextureSpaceToPivotSpace ( |
||
|
ConvertTextureSpaceToPivotSpace ( |
||
|
ConvertTextureSpaceToWorldSpace ( |
World space WRT the sprite editor only |
|
|
ConvertWorldSpaceDeltaToTextureSpace |
||
|
ConvertWorldSpaceToTextureSpace ( |
||
|
CreatePolygonFromBoundingBox ( |
||
|
ExtractRectsFromTexture ( |
||
|
ExtractSourceRegionFromTexturePoint ( |
||
|
FindContours |
||
|
FPaperSprite... |
FindSocket ( |
Search for a socket (. |
|
FindTextureBoundingBox |
Evaluates the SourceUV/SourceDimensons rectangle, finding the tightest bounds that still include all pixels with alpha above AlphaThreshold. |
|
|
UMaterialInt... |
GetAlternateMaterial() |
Return the alternate material for this sprite. |
|
const UPaper... |
GetAtlasGroup() |
|
|
GetBakedAdditionalSourceTextures ( |
Returns the list of additional source textures this should be rendered with. |
|
|
UTexture2D &... |
GetBakedTexture() |
Returns the texture this should be rendered with. |
|
float |
GetCollisionThickness() |
Returns the extrusion thickness of collision geometry when using a 3D collision domain. |
|
UMaterialInt... |
GetDefaultMaterial() |
Return the default material for this sprite. |
|
UMaterialInt... |
GetMaterial ( |
Returns either the default material (index 0) or alternate material (index 1) |
|
GetNumMaterials() |
Returns the number of materials (1 or 2, depending on if there is alternate geometry) |
|
|
GetOriginInSourceImageBeforeTrimming() |
Returns the Origin within SourceImage, prior to atlasing. |
|
|
ESpritePivot... |
GetPivotMode ( |
|
|
GetPivotPosition() |
Returns the current pivot position in texture space. |
|
|
GetPivotToWorld() |
||
|
float |
GetPixelsPerUnrealUnit() |
Return the scaling factor between pixels and Unreal units (cm) |
|
GetRawPivotPosition() |
Returns the raw pivot position (ignoring pixel snapping) |
|
|
FBoxSphereBo... |
GetRenderBounds() |
Returns the render bounds of this sprite. |
|
GetSourceImageDimensionBeforeTrimming() |
Returns the Dimensions of SourceImage prior to trimming. |
|
|
GetSourceSize() |
||
|
UTexture2D &... |
GetSourceTexture() |
|
|
GetSourceUV() |
||
|
ESpriteColli... |
GetSpriteCollisionDomain() |
Returns the collision domain (no collision, 2D, or 3D) |
|
float |
GetUnrealUnitsPerPixel() |
Return the scaling factor between Unreal units (cm) and pixels. |
|
HasAnySockets() |
Returns true if the sprite has any sockets. |
|
|
InitializeSprite ( |
Reinitializes this sprite (. |
|
|
IsRotatedInSourceImage() |
This texture is rotated in the atlas. |
|
|
IsTrimmedInSourceImage() |
Returns true if this sprite is trimmed from the original texture, meaning that the source image dimensions and origin in the source image may not be the same as the final results for the sprite (empty alpha=0 pixels were trimmed from the exterior region) |
|
|
NeedRescaleSpriteData() |
Rescale properties to handle source texture size change. |
|
|
OnObjectReimported ( |
Called when an object is re-imported in the editor. |
|
|
QuerySupportedSockets |
Returns a list of all of the sockets. |
|
|
RebuildCollisionData() |
||
|
RebuildData() |
This is a generic "rebuild all" function that calls RebuildCollisionData() and then RebuildRenderData(). |
|
|
RebuildRenderData() |
||
|
RefreshBakedData() |
||
|
RemoveSocket ( |
Removes the specified socket. |
|
|
RescaleSpriteData ( |
Rescale properties to handle source texture size change. |
|
|
SetPivotMode ( |
||
|
SetRotated |
||
|
SetTrim |
||
|
ValidateSocketNames() |
Make sure all socket names are valid All duplicate / empty names will be made unique |
Name | Description | ||
---|---|---|---|
|
GetAssetRegistryTags ( |
Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects |
|
|
PostEditChangeProperty ( |
Called when a property on this object has been modified externally |
|
|
PostLoad() |
Do any object-specific cleanup required immediately after loading an object. |
|
|
Serialize ( |
Handles reading, writing, and reference collecting using FArchive. |
Name | Description | ||
---|---|---|---|
|
ContainsPhysicsTriMeshData ( |
Interface for checking if the implementing objects contains triangle mesh collision data |
|
|
GetPhysicsTriMeshData ( |
Interface for retrieving triangle mesh collision data from the implementing object |
Name | Description | ||
---|---|---|---|
|
FSlateAtlasD... |
GetSlateAtlasData() |
Gets the atlas data to use when rendering with slate. |
UPaperSpriteComponent