Class AsepriteFile
Parsed representation of an Aseprite file. Should be disposed after use.
Inherited Members
Namespace: UnityEditor.U2D.Aseprite
Syntax
public class AsepriteFile : IDisposable
Properties
alphaPaletteEntry
Palette entry (index) which represent transparent color in all non-background layers (only for Indexed sprites).
Declaration
public byte alphaPaletteEntry { get; }
Property Value
Type | Description |
---|---|
Byte |
animSpeed
Time per frame in milliseconds.
Declaration
public ushort animSpeed { get; }
Property Value
Type | Description |
---|---|
UInt16 |
colorDepth
Color depth (bits per pixel).
Declaration
public ushort colorDepth { get; }
Property Value
Type | Description |
---|---|
UInt16 |
fileSize
File size in bytes.
Declaration
public uint fileSize { get; }
Property Value
Type | Description |
---|---|
UInt32 |
frameData
Parsed data of each frame.
Declaration
public ReadOnlyCollection<FrameData> frameData { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<FrameData> |
gridHeight
Grid height (zero if there is no grid).
Declaration
public ushort gridHeight { get; }
Property Value
Type | Description |
---|---|
UInt16 |
gridPosX
X position of the grid.
Declaration
public short gridPosX { get; }
Property Value
Type | Description |
---|---|
Int16 |
gridPosY
Y position of the grid.
Declaration
public short gridPosY { get; }
Property Value
Type | Description |
---|---|
Int16 |
gridWidth
Grid width (zero if there is no grid, grid size is 16x16 on Aseprite by default).
Declaration
public ushort gridWidth { get; }
Property Value
Type | Description |
---|---|
UInt16 |
height
Canvas height in pixels.
Declaration
public ushort height { get; }
Property Value
Type | Description |
---|---|
UInt16 |
noOfColors
Number of colors (0 means 256 for old sprites).
Declaration
public ushort noOfColors { get; }
Property Value
Type | Description |
---|---|
UInt16 |
noOfFrames
Number of frames in the file.
Declaration
public ushort noOfFrames { get; }
Property Value
Type | Description |
---|---|
UInt16 |
pixelHeight
Pixel height (pixel ratio is "pixel width/pixel height"). If this or pixel width field is zero, pixel ratio is 1:1.
Declaration
public byte pixelHeight { get; }
Property Value
Type | Description |
---|---|
Byte |
pixelWidth
Pixel width (pixel ratio is "pixel width/pixel height"). If this or pixel height field is zero, pixel ratio is 1:1.
Declaration
public byte pixelWidth { get; }
Property Value
Type | Description |
---|---|
Byte |
width
Canvas width in pixels.
Declaration
public ushort width { get; }
Property Value
Type | Description |
---|---|
UInt16 |
Methods
Dispose()
Declaration
public void Dispose()