Logo

dev-resources.site

for different kinds of informations.

Unity Tutorial: Simple Aseprite to Unity workflow using an Automated Scripted Importer

Published at
7/30/2020
Categories
indiegamedev
untiy2d
unity3d
aseprite
Author
antonmihaylov
Author
13 person written this
antonmihaylov
open
Unity Tutorial: Simple Aseprite to Unity workflow using an Automated Scripted Importer

If you develop games with Unity and make pixel art for them with Aseprite you probably did the same annoying thing over and over again, just like me:

  • Create pixel art in Aseprite
  • Export the image to a png/pngs
  • Open up Unity to import them, set up animations or load them into sprites
  • Realize you need to adjust pixel art images
  • Change them up in Aseprite
  • Export them again
  • Open up Unity, but realize that you have to re-do the animation, because you added one more frame now, or see that the reference to the sprite has been broken up
  • Fix that
  • Repeat

But a lot of this can be cut down to this:

  • Create pixel art in Aseprite, inside the Assets folder
  • Save the file and have Unity load sprites and animations automatically every time you change it
  • ..that’s it

And this all can happen with the magic of the new Unity’s Scripted Importers API. (Which is still experimental by the way, but it gets the job done)

So, anyway, let’s see how setting up a project using a custom Scripted Importer for Aseprite looks like.

Creating the Aseprite file

Our first job of course is to create the pixel art in Aseprite.

We have our green guy here, with three animations: Running, Jump Charging, and Jumping. Nothing special for now, let’s save that file to Unity and see what happens.

Importing the Aseprite file in Unity

The player asset you see highlighted there is the .ase file that we saved earlier. When expanded, you can see that all of our frames are automatically exported from Aseprite and imported into Unity. And, which is more, you have the animations on the top there, ready to be plugged in in your Animation controller. And all I did was save the Aseprite file to the Assets folder.

Let’s add an animation to an object, so we can see it in action.

Automatically importing changes

Let’s say that we now want to change up the pixel art, for example – let’s make it purple.

We hop over to Aseprite and adjust the hue a bit and we have this:

Now, if we go back to unity (I’m still in Play mode by the way), we see that it is automatically re-imported with the updated pixel art, without doing anything

Auto Importer for Aseprite

I’ve bundled up the Scripted Importer that you see in action and I made an asset on the asset store, so that not only I can benefit from it.

You can find it here:

Auto Importer for Aseprite LITE

Auto Importer for Aseprite PRO

With the only difference being that the PRO version supports animations and the lite doesn’t.

Hopefully they can be of use to you too!

indiegamedev Article's
26 articles in total
Favicon
Empowering Indie Game Developers: A Showcase Platform Built with Passion
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep37: Items model and equipment
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep35: Simple quest system
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep30: Spells and visual effects
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep29: Chat message clouds
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep27: Music and sound settings
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep28: Global countdown
Favicon
JavaScript MMORPG - Maiu Online - #babylonjs - Ep: 26 Abilities definitions and new targeting marks
Favicon
Maiu Online - Browser MMORPG #indiegamedev #babylonjs Ep23 - Global Chat
Favicon
Maiu Online - Browser MMORPG #indiegamedev #babylonjs Ep22 - Map editor
Favicon
#babylonjs Browser MMORPG #indiegamedev Ep21 - Spatial Hash Grid Area of Interest
Favicon
Browser MMORPG #indiegamedev #babylonjs Ep20 - Client Side Prediction & Reconciliation
Favicon
Babylon.js Browser MMORPG - DevLog - Update #10- Entities interpolation
Favicon
Babylon.js Browser MMORPG - DevLog - Update - #9 - Floating combat text optimization
Favicon
Babylon.js Browser MMORPG - DevLog - Update #8 - Syncing combat animations, sound and damage text
Favicon
Babylon.js Browser MMORPG - DevLog- Update #7 - Player combat abilities
Favicon
Lus: Last Unit Standing Trailer
Favicon
Hello everyone!
Favicon
Project Universe Game Dev Update
Favicon
Project Universe Game Dev update
Favicon
Project Universe Indie Game Dev update
Favicon
Unity Tutorial: Simple Aseprite to Unity workflow using an Automated Scripted Importer
Favicon
New version of Crystal Blast 2.0
Favicon
Crystal Blast 2.0
Favicon
Game development is hard
Favicon
Making Story-Driven Indie Games with No Budget

Featured ones: