Navigation
API > API/Plugins > API/Plugins/Paper2D
This class represents a single layer in a tile map. All layers in the map must have the size dimensions.
| Name | UPaperTileLayer |
| Type | class |
| Header File | /Engine/Plugins/2D/Paper2D/Source/Paper2D/Classes/PaperTileLayer.h |
| Include Path | #include "PaperTileLayer.h" |
Syntax
UCLASS (MinimalAPI)
class UPaperTileLayer : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPaperTileLayer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPaperTileLayer
(
const FObjectInitializer& ObjectInitializer |
PaperTileLayer.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| LayerName | FText | Name of the layer. | PaperTileLayer.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllocatedCells | TArray< FPaperTileInfo > | The allocated tile data. | PaperTileLayer.h | |
| AllocatedHeight | int32 | The allocated height of the tile data (used to handle resizing without data loss) | PaperTileLayer.h | |
| AllocatedWidth | int32 | The allocated width of the tile data (used to handle resizing without data loss) | PaperTileLayer.h | |
| bHiddenInEditor | uint32 | Is this layer currently hidden in the editor? | PaperTileLayer.h |
|
| bHiddenInGame | uint32 | Should this layer be hidden in the game? | PaperTileLayer.h |
|
| bLayerCollides | uint32 | Should this layer generate collision? Note: This only has an effect if the owning tile map has collision enabled | PaperTileLayer.h |
|
| bOverrideCollisionOffset | uint32 | Should this layer use a custom offset for generated collision instead of the layer drawing offset? | PaperTileLayer.h |
|
| bOverrideCollisionThickness | uint32 | Should this layer use a custom thickness for generated collision instead of the thickness setting in the tile map? | PaperTileLayer.h |
|
| CollisionOffsetOverride | float | The override offset of the collision for this layer (when bOverrideCollisionOffset is set) Note: This is measured in Unreal Units (cm) from the center of the tile map component, not from the previous layer. | PaperTileLayer.h |
|
| CollisionThicknessOverride | float | The override thickness of the collision for this layer (when bOverrideCollisionThickness is set) | PaperTileLayer.h |
|
| LayerColor | FLinearColor | The color of this layer (multiplied with the tile map color and passed to the material as a vertex color) | PaperTileLayer.h |
|
| LayerHeight | int32 | Height of the layer (in tiles) | PaperTileLayer.h |
|
| LayerWidth | int32 | Width of the layer (in tiles) | PaperTileLayer.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AugmentBodySetup
(
UBodySetup* ShapeBodySetup, |
Adds collision to the specified body setup. | PaperTileLayer.h | |
void ConvertToTileSetPerCell() |
PaperTileLayer.h | ||
void DestructiveAllocateMap
(
int32 NewWidth, |
Reallocates the map. This is a destructive operation that does not copy data across! | PaperTileLayer.h | |
FPaperTileInfo GetCell
(
int32 X, |
Returns the tile information about the specified cell. | PaperTileLayer.h | |
bool GetLayerCollides() |
Should this layer generate collision? Note: This only has an effect if the owning tile map has collision enabled | PaperTileLayer.h | |
FLinearColor GetLayerColor() |
Gets the layer-specific color multiplier. | PaperTileLayer.h | |
int32 GetLayerHeight() |
Returns the height of the layer (in tiles) | PaperTileLayer.h | |
int32 GetLayerIndex() |
Returns the index of this layer in the parent tile map. | PaperTileLayer.h | |
int32 GetLayerWidth() |
Returns the width of the layer (in tiles) | PaperTileLayer.h | |
int32 GetNumOccupiedCells() |
Returns the number of occupied cells in the layer. | PaperTileLayer.h | |
UPaperTileMap * GetTileMap() |
Returns the parent tile map. | PaperTileLayer.h | |
bool InBounds
(
int32 X, |
Returns whether the specified coordinates are in bounds for the layer. | PaperTileLayer.h | |
const FPaperTileInfo * PRIVATE_GetAllocatedCells() |
Returns the raw pointer to the allocated cells, only for use when rendering the tile map and should never be held onto. | PaperTileLayer.h | |
void ResizeMap
(
int32 NewWidth, |
Reallocates the map. This tries to preserve contents. | PaperTileLayer.h | |
void SetCell
(
int32 X, |
Sets the tile information about the specified cell. | PaperTileLayer.h | |
void SetLayerCollides
(
bool bShouldCollide |
PaperTileLayer.h | ||
void SetLayerCollisionOffset
(
bool bShouldOverride, |
PaperTileLayer.h | ||
void SetLayerCollisionThickness
(
bool bShouldOverride, |
PaperTileLayer.h | ||
void SetLayerColor
(
FLinearColor NewColor |
Sets the layer-specific color multiplier (Note: does not invalidate any components using this layer!) | PaperTileLayer.h | |
void SetShouldRenderInEditor
(
bool bShouldRender |
Set whether this layer should be drawn (in the editor) | PaperTileLayer.h | |
bool ShouldRenderInEditor() |
Should this layer be drawn (in the editor)? | PaperTileLayer.h | |
bool ShouldRenderInGame() |
Should this layer be drawn (in game)? | PaperTileLayer.h | |
bool UsesTileSet
(
UPaperTileSet* TileSet |
Checks to see if this layer uses the specified tile set Note: This is a slow operation, it scans each tile! | PaperTileLayer.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
PaperTileLayer.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ReallocateAndCopyMap() |
PaperTileLayer.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FTransform GetTileTransform
(
int32 FlagIndex |
Returns the transform for the given packed flag index (0..7) | PaperTileLayer.h |