Skip to content

Commit

Permalink
Merge pull request #12 from JayKEm/patch-1
Browse files Browse the repository at this point in the history
Anim_Import is now ASE to Unity, which has its own project dedicated to it.
  • Loading branch information
SGDatUVA authored Sep 13, 2018
2 parents cc1dc61 + 16a9b28 commit d709406
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions aseprite/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,4 @@

First, you will need to [download Aseprite](./download.md). Next, you will of course need Unity so please see the [Unity subwiki](../unity/index.md) for that.

Finally, you will need the [Anim_Import.cs script](https://gist.github.com/SGDatUVA/10a37b86433a8061d57085fa8376df42).

How to use `Anim_Import`:

* This guide is originally from the [SGD project Kin](https://github.com/UVASGD/spring-2017-kin) so if some of the stuff seems nonspecific to your own project, that is why.
* This program imports animation clips from .ase files and attaches them to GameObjects.
* It was created to make it easier to create sprite animations with dynamic frame lengths in Unity, as it is very tedious and time consuming to do manually.

Steps:

1. **Locate aseprite.exe**
This is an absolute must. Without having Aseprite installed on the current machine, the program cannot import data from .ase files. The program assumes you'll have it installed at the default location, but this may differ depending on how you installed Aseprite.

2. **Locate the art folder**
The program tries to do this automatically by assuming it is located in the same directory as the Unity project, but this may differ from project to project. Enter the location in the "Art Folder" field.

3. **Extract data from .ase file**
Once you've located the art folder, the "Aseprite File" field will update to include a list of all .ase files it has found. (.aseprite files are ignored, unfortunately). The currently selected file will be where all the animation data is imported from. By clicking "Extract From .ase File" the program will create a subfolder called "JSON" to put all the information it extracts.

4. **[optional] Select GameObject**
From the project, select a GameObject whose animation you would like to update. If you only wish to view the animation data from the .ase file, simply deselect "Apply Directly to Object"

5. **Import Animation Data**
Press "Import Animation Data" to run the bulk of the program. It will import animation data from the selected .ase file in the "Aseprite File" field. If successful, the program will both output the data in the text area "Anim Data" as well as update every AnimationClip attached to the GameObject.

Selecting "Show Frame Data" will show where each frame should be located in regards to sample index. This can be used for debug purposes.

Typically .ase files contain loops. The program assumes that you want to create AnimationClips of with the same names as these loops, as this generally is how the animation is first created. However, since it goes through the existing AnimationClips first instead, it will not import the animation if the .ase file does not contain a loop of the same name.

I haven't programmed the capability of adding AnimationClips using .ase animation data, so you'll have to first create a dummy Animation for each GameObject if you want to use this program. Sorry! *Note*: If you want to program that yourself, go ahead and implement the method called `createClips()`. Also, in `onGUI()`, make sure to change the variable `update` to enable that method!

[Back](./index.md)
Next, you will need the [ASE to Unity Tool](https://github.com/UVASGD/tools-Aseprite-to-Unity). Download the latest release and import it into your Unity project through `Assets` -> `Import Package` -> `Custom Package...`. The repository has a readme that can guide you through the steps from there.

0 comments on commit d709406

Please sign in to comment.