Navigation
API > API/Plugins > API/Plugins/Paper2D
A tile set is a collection of tiles pulled from a texture that can be used to fill out a tile map.
| Name | UPaperTileSet |
| Type | class |
| Header File | /Engine/Plugins/2D/Paper2D/Source/Paper2D/Classes/PaperTileSet.h |
| Include Path | #include "PaperTileSet.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType)
class UPaperTileSet : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPaperTileSet
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPaperTileSet
(
const FObjectInitializer& ObjectInitializer |
PaperTileSet.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AdditionalSourceTextures | TArray< TObjectPtr< UTexture > > | Additional source textures for other slots. | PaperTileSet.h |
|
| AllocatedHeight | int32 | Allocated height of the per-tile data. | PaperTileSet.h | |
| AllocatedWidth | int32 | Allocated width of the per-tile data. | PaperTileSet.h | |
| BackgroundColor | FLinearColor | The background color displayed in the tile set viewer | PaperTileSet.h |
|
| BorderMargin | FIntMargin | The amount of padding around the border of the tile sheet (in pixels) | PaperTileSet.h |
|
| DrawingOffset | FIntPoint | The drawing offset for tiles from this set (in pixels) | PaperTileSet.h |
|
| HeightInTiles | int32 | Cached height of this tile set (in tiles) | PaperTileSet.h | |
| PerTileData | TArray< FPaperTileMetadata > | Per-tile information. | PaperTileSet.h |
|
| PerTileSpacing | FIntPoint | The amount of padding between tiles in the tile sheet (in pixels) | PaperTileSet.h |
|
| Terrains | TArray< FPaperTileSetTerrain > | Terrain information. | PaperTileSet.h | |
| TileSheet | TObjectPtr< UTexture2D > | The tile sheet texture associated with this tile set. | PaperTileSet.h |
|
| TileSize | FIntPoint | The width and height of a single tile (in pixels) | PaperTileSet.h |
|
| WidthInTiles | int32 | Cached width of this tile set (in tiles) | PaperTileSet.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AddTerrainDescription
(
FPaperTileSetTerrain NewTerrain |
Adds a new terrain to this tile set (returns false if the maximum number of terrains has already been reached) | PaperTileSet.h | |
| PaperTileSet.h | |||
FLinearColor GetBackgroundColor() |
Returns the background color displayed in the tile set viewer. | PaperTileSet.h | |
FIntPoint GetDrawingOffset() |
Returns the drawing offset for tiles from this set (in pixels) | PaperTileSet.h | |
FIntMargin GetMargin() |
Returns the amount of padding around the border of the tile sheet (in pixels) | PaperTileSet.h | |
FPaperTileMetadata * GetMutableTileMetadata
(
int32 TileIndex |
Returns editable tile metadata for the specified tile index. | PaperTileSet.h | |
int32 GetNumTerrains() |
Returns the number of terrains this tile set has. | PaperTileSet.h | |
FIntPoint GetPerTileSpacing() |
Returns the amount of padding between tiles in the tile sheet (in pixels) | PaperTileSet.h | |
FPaperTileSetTerrain GetTerrain
(
int32 Index |
PaperTileSet.h | ||
int32 GetTerrainMembership
(
const FPaperTileInfo& TileInfo |
Returns the terrain type this tile is a member of, or INDEX_NONE if it is not part of a terrain. | PaperTileSet.h | |
int32 GetTileCount() |
Returns the number of tiles in this tile set. | PaperTileSet.h | |
int32 GetTileCountX() |
Returns the number of tiles per row in this tile set. | PaperTileSet.h | |
int32 GetTileCountY() |
Returns the number of tiles per column in this tile set. | PaperTileSet.h | |
const FPaperTileMetadata * GetTileMetadata
(
int32 TileIndex |
Returns the tile metadata for the specified tile index. | PaperTileSet.h | |
FIntPoint GetTileSheetAuthoredSize() |
Returns the imported size of the tile sheet texture (in pixels) | PaperTileSet.h | |
UTexture2D * GetTileSheetTexture() |
Returns the tile sheet texture associated with this tile set. | PaperTileSet.h | |
FIntPoint GetTileSize() |
Returns the size of a tile (in pixels) | PaperTileSet.h | |
FName GetTileUserData
(
int32 TileIndex |
Returns the user data name for the specified tile, or NAME_None if there is no user-specified data. | PaperTileSet.h | |
bool GetTileUV
(
int32 TileIndex, |
Returns the texture-space coordinates of the top left corner of the specified tile index. | PaperTileSet.h | |
FIntPoint GetTileUVFromTileXY
(
const FIntPoint& TileXY |
Returns the texture-space coordinates of the top left corner of the tile at (TileXY.X, TileXY.Y) | PaperTileSet.h | |
FIntPoint GetTileXYFromTextureUV
(
const FVector2D& TextureUV, |
Converts the texture-space coordinates into tile coordinates. | PaperTileSet.h | |
void SetBackgroundColor
(
FLinearColor NewColor |
Returns the background color displayed in the tile set viewer. | PaperTileSet.h | |
void SetDrawingOffset
(
FIntPoint NewDrawingOffset |
Sets the drawing offset for tiles from this set (in pixels) Note: Does not trigger a rebuild of any tile map components using this tile set | PaperTileSet.h | |
void SetMargin
(
FIntMargin NewMargin |
Sets the amount of padding around the border of the tile sheet (in pixels) Note: Does not trigger a rebuild of any tile map components using this tile set | PaperTileSet.h | |
void SetPerTileSpacing
(
FIntPoint NewSpacing |
Sets the amount of padding between tiles in the tile sheet (in pixels) Note: Does not trigger a rebuild of any tile map components using this tile set | PaperTileSet.h | |
void SetTileSheetTexture
(
UTexture2D* NewTileSheet |
Sets the tile sheet texture associated with this tile set Note: Does not trigger a rebuild of any tile map components using this tile set | PaperTileSet.h | |
void SetTileSize
(
FIntPoint NewSize |
Sets the size of a tile (in pixels) Note: Does not trigger a rebuild of any tile map components using this tile set | PaperTileSet.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
PaperTileSet.h | ||
virtual void PostLoad() |
PaperTileSet.h | ||
virtual void Serialize
(
FArchive& Ar |
PaperTileSet.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DestructiveAllocateTileData
(
int32 NewWidth, |
Reallocates the PerTileData array to the specified size. Note: This is a destructive operation! | PaperTileSet.h | |
void ReallocateAndCopyTileData() |
Reallocates the per-tile data to match the current (WidthInTiles, HeightInTiles) size, copying over what it can. | PaperTileSet.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FName GetPerTilePropertyName() |
PaperTileSet.h |