PAPER2UPaperImporterSettings

Implements the settings for imported Paper2D assets, such as sprite sheet textures.

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

PAPER2UPaperImporterSettings

References

Module

Paper2DEditor

Header

/Engine/Plugins/2D/Paper2D/Source/Paper2DEditor/Classes/PaperImporterSettings.h

Include

#include "PaperImporterSettings.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Config=Editor, defaultconfig)
class PAPER2UPaperImporterSettings : public UObject

Remarks

Implements the settings for imported Paper2D assets, such as sprite sheet textures.

Variables

Name Description

Protected variable UProperty Category, EditAnywhere Config

bool

 

bAnalysisCanUseOpaque

Can opaque materials be applied as part of the 'best material' analysis?

Protected variable UProperty Category, EditAnywhere Config

TArray< FString...

 

BaseMapTextureSuffixes

The default suffix to remove (if present) from a texture name before looking for an associated normal map using NormalMapTextureSuffixes.

Protected variable UProperty Category, EditAnywhere Config

bool

 

bOverrideTextureCompression

Should texture compression settings be overridden on imported sprite textures, tile sheets, etc...?

Protected variable UProperty Category, EditAnywhere Config

bool

 

bPickBestMaterialWhenCreatingSprites

Should the source texture be scanned when creating new sprites to determine the appropriate material? (if false, the Default Masked Material is always used)

Protected variable UProperty Category, EditAnywhere Config

bool

 

bPickBestMaterialWhenCreatingTileMaps

Should the source texture be scanned when creating new tile maps (from a tile set or via importing) to determine the appropriate material? (if false, the Default Masked Material is always used)

Protected variable UProperty Category, EditAnywhere Config

float

 

DefaultPixelsPerUnrealUnit

The default scaling factor between pixels and Unreal units (cm) to use for newly created sprite assets (e.g., 0.64 would make a 64 pixel wide sprite take up 100 cm)

Protected variable UProperty Category, EditAnywhere, Meta Config

TEnumAsByte< Te...

 

DefaultSpriteTextureCompression

Compression settings to use when building the texture.

Protected variable UProperty Category, EditAnywhere Config

TEnumAsByte< Te...

 

DefaultSpriteTextureGroup

The default texture group for imported sprite textures, tile sheets, etc... (typically set to UI for 'modern 2D' or 2D pixels for 'retro 2D')

Protected variable UProperty Category, EditAnywhere, Meta Config

FSoftObjectPath

 

LitDefaultMaskedMaterialName

The lit default masked material for newly created sprites (masked means binary opacity: things are either opaque or see-thru, with nothing in between)

Protected variable UProperty Category, EditAnywhere, Meta Config

FSoftObjectPath

 

LitDefaultOpaqueMaterialName

The lit default opaque material for newly created sprites.

Protected variable UProperty Category, EditAnywhere, Meta Config

FSoftObjectPath

 

LitDefaultTranslucentMaterialName

The lit default translucent material for newly created sprites (translucent means smooth opacity which can vary continuously from 0..1, but translucent rendering is more expensive that opaque or masked rendering and has different sorting rules)

Protected variable UProperty Category, EditAnywhere Config

TArray< FString...

 

NormalMapTextureSuffixes

A list of default suffixes to use when looking for associated normal maps while importing sprites or creating sprites from textures.

Protected variable UProperty Category, EditAnywhere, Meta Config

FSoftObjectPath

 

UnlitDefaultMaskedMaterialName

The unlit default masked material for newly created sprites (masked means binary opacity: things are either opaque or see-thru, with nothing in between)

Protected variable UProperty Category, EditAnywhere, Meta Config

FSoftObjectPath

 

UnlitDefaultOpaqueMaterialName

The unlit default opaque material for newly created sprites.

Protected variable UProperty Category, EditAnywhere, Meta Config

FSoftObjectPath

 

UnlitDefaultTranslucentMaterialName

The unlit default translucent material for newly created sprites (translucent means smooth opacity which can vary continuously from 0..1, but translucent rendering is more expensive that opaque or masked rendering and has different sorting rules)

Functions

Name Description

Public function Const

ESpriteInitM...

 

AnalyzeTextureForDesiredMaterialType

(
    UTexture* Texture,
    const FIntPoint& Offset,
    const FIntPoint& Dimensions
)

Analyzes the specified texture in the Offset..Offset+Dimensions region and returns the best kind of material to represent the alpha content in the texture (typically masked or translucent, but can return opaque if bAnalysisCanUseOpaque is true

Public function Const

void

 

ApplySettingsForSpriteInit

(
    FSpriteAssetInitParameters& InitPa...,
    ESpriteInitMaterialLightingMode Lig...,
    ESpriteInitMaterialType MaterialTyp...
)

Fills out the sprite init parameters with the default settings given the desired material type and lighting mode (which can both be automatic)

Public function Const

void

 

ApplySettingsForTileMapInit

(
    UPaperTileMap* TileMap,
    UPaperTileSet* DefaultTileSet,
    ESpriteInitMaterialLightingMode Lig...,
    ESpriteInitMaterialType MaterialTyp...,
    bool bCreateEmptyLayer
)

Fills out the tile map with the default settings given the desired material type and lighting mode (which can both be automatic)

Public function Const

void

 

ApplyTextureSettings

(
    UTexture2D* Texture
)

Applies the compression settings to the specified texture.

Public function Const

void

 

GenerateNormalMapNamesToTest

(
    const FString& InRoot,
    TArray< FString >& InOutNames
)

Generates names to test for a normal map using NormalMapTextureSuffixes.

Public function Const

UMaterialInt...

 

GetDefaultMaskedMaterial

(
    bool bLit
)

Returns the default masked material.

Public function Const

UMaterialInt...

 

GetDefaultMaterial

(
    ESpriteInitMaterialType MaterialTyp...,
    bool bUseLitMaterial
)

Returns the default material for the specified material type.

Public function Const

UMaterialInt...

 

GetDefaultOpaqueMaterial

(
    bool bLit
)

Returns the default opaque material.

Public function Const

float

 

GetDefaultPixelsPerUnrealUnit()

Returns the default pixels/uu setting.

Public function Const

UMaterialInt...

 

GetDefaultTranslucentMaterial

(
    bool bLit
)

Returns the default translucent material.

Public function Const

FString

 

RemoveSuffixFromBaseMapName

(
    const FString& InName
)

Removes the suffix from the specified name if it matches something in BaseMapTextureSuffixes.

Public function Const

bool

 

ShouldPickBestMaterialWhenCreatingTileMaps()

Should the source texture be scanned when creating new tile maps (from a tile set or via importing) to determine the appropriate material? (if false, the Default Masked Material is always used)

Public function

 

UPaperImporterSettings()

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