Skip to content

Transparency Color sprite property not respected in Indexed color mode #51

@vgf89

Description

@vgf89

Describe the bug
If I import an indexed color mode aseprite file where the color referenced by the Transparent Color setting is not transparent, the importer ignores the Transparent Color setting and instead fills the background with the color at that index.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new aseprite file with indexed color mode (the default color has solid black as index 0, but also sets the Transparent Color sprite property to index 0).
  2. Add a stroke of a different color to the canvas (leaving some areas of the canvas blank)
  3. Import the ase file in Unity and look at it
  4. Observe that the background within the x and y bounds of the stroke on the canvas is now black rather than transparent.

Expected behavior
The aseprite importer should respect the "Transparent Color" sprite property in indexed color mode, and instead of filling with the index color, fills it with transparent.

My current workarounds: Set the color of the transparent color index to transparent. Set the color of the transparent color index to a color I don't expect to use then use mask transparency mode in the importer. These kinds of workarounds feel like they should be unnecessary.

Screenshots
asefile
settings
Indexed Color mode:
bad
RGB Color mode:
good(rgb mode)

Desktop (please complete the following information):

  • OS: Windows 11
  • Unity 2020.3.21f

Additional context

The file I'm testing with:
Enemy.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions