Class AsepriteFile
Parsed representation of an Aseprite file. Should be disposed after use.
Implements
Inherited Members
Namespace: UnityEditor .U2D.Aseprite
Assembly: Unity.2D.Aseprite.Editor.dll
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 |
---|---|
ushort |
colorDepth
Color depth (bits per pixel).
Declaration
public ushort colorDepth { get; }
Property Value
Type | Description |
---|---|
ushort |
fileSize
File size in bytes.
Declaration
public uint fileSize { get; }
Property Value
Type | Description |
---|---|
uint |
frameData
Parsed data of each frame.
Declaration
public ReadOnlyCollection<FrameData> frameData { get; }
Property Value
Type | Description |
---|---|
Read |
gridHeight
Grid height (zero if there is no grid).
Declaration
public ushort gridHeight { get; }
Property Value
Type | Description |
---|---|
ushort |
gridPosX
X position of the grid.
Declaration
public short gridPosX { get; }
Property Value
Type | Description |
---|---|
short |
gridPosY
Y position of the grid.
Declaration
public short gridPosY { get; }
Property Value
Type | Description |
---|---|
short |
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 |
---|---|
ushort |
height
Canvas height in pixels.
Declaration
public ushort height { get; }
Property Value
Type | Description |
---|---|
ushort |
noOfColors
Number of colors (0 means 256 for old sprites).
Declaration
public ushort noOfColors { get; }
Property Value
Type | Description |
---|---|
ushort |
noOfFrames
Number of frames in the file.
Declaration
public ushort noOfFrames { get; }
Property Value
Type | Description |
---|---|
ushort |
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 |
---|---|
ushort |
Methods
Dispose()
Disposes the loaded Aseprite file.
Declaration
public void Dispose()