PAPER2UPaperTileSet

A tile set is a collection of tiles pulled from a texture that can be used to fill out a tile map.

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

PAPER2UPaperTileSet

References

Module

Paper2D

Header

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

Include

#include "PaperTileSet.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(BlueprintType)
class PAPER2UPaperTileSet : public UObject

Remarks

A tile set is a collection of tiles pulled from a texture that can be used to fill out a tile map.

Constructors

Name Description

Public function

PAPER2UPaperTileSet

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

bool

 

AddTerrainDescription

(
    FPaperTileSetTerrain NewTerrain
)

Adds a new terrain to this tile set (returns false if the maximum number of terrains has already been reached)

Protected function

void

 

DestructiveAllocateTileData

(
    int32 NewWidth,
    int32 NewHeight
)

Reallocates the PerTileData array to the specified size.

Public function Const

TArray< UTex...

 

GetAdditionalTextures()

Public function Const

FLinearColor

 

GetBackgroundColor()

Returns the background color displayed in the tile set viewer.

Public function Const

FIntPoint

 

GetDrawingOffset()

Returns the drawing offset for tiles from this set (in pixels)

Public function Const

FIntMargin

 

GetMargin()

Returns the amount of padding around the border of the tile sheet (in pixels)

Public function

FPaperTileMe...

 

GetMutableTileMetadata

(
    int32 TileIndex
)

Returns editable tile metadata for the specified tile index.

Public function Const

int32

 

GetNumTerrains()

Returns the number of terrains this tile set has.

Public function Static

FName

 

GetPerTilePropertyName()

Public function Const

FIntPoint

 

GetPerTileSpacing()

Returns the amount of padding between tiles in the tile sheet (in pixels)

Public function Const

FPaperTileSe...

 

GetTerrain

(
    int32 Index
)

Public function Const

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.

Public function Const

int32

 

GetTileCount()

Returns the number of tiles in this tile set.

Public function Const

int32

 

GetTileCountX()

Returns the number of tiles per row in this tile set.

Public function Const

int32

 

GetTileCountY()

Returns the number of tiles per column in this tile set.

Public function Const

const FPaper...

 

GetTileMetadata

(
    int32 TileIndex
)

Returns the tile metadata for the specified tile index.

Public function Const

FIntPoint

 

GetTileSheetAuthoredSize()

Returns the imported size of the tile sheet texture (in pixels)

Public function Const

UTexture2D &...

 

GetTileSheetTexture()

Returns the tile sheet texture associated with this tile set.

Public function Const

FIntPoint

 

GetTileSize()

Returns the size of a tile (in pixels)

Public function Const

FName

 

GetTileUserData

(
    int32 TileIndex
)

Returns the user data name for the specified tile, or NAME_None if there is no user-specified data.

Public function Const

bool

 

GetTileUV

(
    int32 TileIndex,
    FVector2D& Out_TileUV
)

Returns the texture-space coordinates of the top left corner of the specified tile index.

Public function Const

FIntPoint

 

GetTileUVFromTileXY

(
    const FIntPoint& TileXY
)

Returns the texture-space coordinates of the top left corner of the tile at (TileXY.X, TileXY.Y)

Public function Const

FIntPoint

 

GetTileXYFromTextureUV

(
    const FVector2D& TextureUV,
    bool bRoundUp
)

Converts the texture-space coordinates into tile coordinates.

Protected function

void

 

ReallocateAndCopyTileData()

Reallocates the per-tile data to match the current (WidthInTiles, HeightInTiles) size, copying over what it can.

Public function

void

 

SetBackgroundColor

(
    FLinearColor NewColor
)

Returns the background color displayed in the tile set viewer.

Public function

void

 

SetDrawingOffset

(
    FIntPoint NewDrawingOffset
)

Sets the drawing offset for tiles from this set (in pixels)

Public function

void

 

SetMargin

(
    FIntMargin NewMargin
)

Sets the amount of padding around the border of the tile sheet (in pixels)

Public function

void

 

SetPerTileSpacing

(
    FIntPoint NewSpacing
)

Sets the amount of padding between tiles in the tile sheet (in pixels)

Public function

void

 

SetTileSheetTexture

(
    UTexture2D* NewTileSheet
)

Sets the tile sheet texture associated with this tile set.

Public function

void

 

SetTileSize

(
    FIntPoint NewSize
)

Sets the size of a tile (in pixels)

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.

See Also

UPaperTileMap

UPaperTileMapComponent

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss