PAPER2UPaperTileLayer

This class represents a single layer in a tile map. All layers in the map must have the size dimensions.

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

PAPER2UPaperTileLayer

References

Module

Paper2D

Header

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

Include

#include "PaperTileLayer.h"

Syntax

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

Remarks

This class represents a single layer in a tile map. All layers in the map must have the size dimensions.

Variables

Name Description

Public variable UProperty Category BlueprintReadOnly

FText

 

LayerName

Name of the layer.

Constructors

Name Description

Public function

PAPER2UPaperTileLayer

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

AugmentBodySetup

(
    UBodySetup* ShapeBodySetup,
    float RenderSeparation
)

Adds collision to the specified body setup.

Public function

void

 

ConvertToTileSetPerCell()

Public function

void

 

DestructiveAllocateMap

(
    int32 NewWidth,
    int32 NewHeight
)

Reallocates the map. This is a destructive operation that does not copy data across!

Public function Const

FPaperTileIn...

 

GetCell

(
    int32 X,
    int32 Y
)

Returns the tile information about the specified cell.

Public function Const

FLinearColor

 

GetLayerColor()

Gets the layer-specific color multiplier.

Public function Const

int32

 

GetLayerHeight()

Returns the height of the layer (in tiles)

Public function Const

int32

 

GetLayerIndex()

Returns the index of this layer in the parent tile map.

Public function Const

int32

 

GetLayerWidth()

Returns the width of the layer (in tiles)

Public function Const

int32

 

GetNumOccupiedCells()

Returns the number of occupied cells in the layer.

Public function Const

UPaperTileMa...

 

GetTileMap()

Returns the parent tile map.

Public function Static

FTransform

 

GetTileTransform

(
    int32 FlagIndex
)

Returns the transform for the given packed flag index (0..7)

Public function Const

bool

 

InBounds

(
    int32 X,
    int32 Y
)

Returns whether the specified coordinates are in bounds for the layer.

Public function Const

const FPaper...

 

PRIVATE_GetAllocatedCells()

Returns the raw pointer to the allocated cells, only for use when rendering the tile map and should never be held onto.

Protected function

void

 

ReallocateAndCopyMap()

Public function

void

 

ResizeMap

(
    int32 NewWidth,
    int32 NewHeight
)

Reallocates the map. This tries to preserve contents.

Public function

void

 

SetCell

(
    int32 X,
    int32 Y,
    const FPaperTileInfo& NewValue
)

Sets the tile information about the specified cell.

Public function

void

 

SetLayerCollides

(
    bool bShouldCollide
)

Public function

void

 

SetLayerCollisionOffset

(
    bool bShouldOverride,
    float OverrideValue
)

Public function

void

 

SetLayerCollisionThickness

(
    bool bShouldOverride,
    float OverrideValue
)

Public function

void

 

SetLayerColor

(
    FLinearColor NewColor
)

Sets the layer-specific color multiplier (.

Public function

void

 

SetShouldRenderInEditor

(
    bool bShouldRender
)

Set whether this layer should be drawn (in the editor)

Public function Const

bool

 

ShouldRenderInEditor()

Should this layer be drawn (in the editor)?

Public function Const

bool

 

ShouldRenderInGame()

Should this layer be drawn (in game)?

Public function Const

bool

 

UsesTileSet

(
    UPaperTileSet* TileSet
)

Checks to see if this layer uses the specified tile set.

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

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