Importing Sprites / Creating Animations
This gets its own section because there’s a bunch of ways to do it
Basic:
- To Import Sprites
- When you create a Room or Character, a new folder will be created for it.
- Eg. Assets\Game\Characters\Dave\
- Navigate to that in the Project window (click on the character/room in the Power Quest Panel)
- For Photoshop users:
- Open photoshop file to import
- Right click in the appropriate **\Sprites** folder in unity, select
Import Sprites from Photoshop
- Or: Save/Drag the sprites or spritesheets you want into the appropriate \Sprites folder
- Create animations
- Navigate to the folder for the Character or Room in the Project Window
- Click
Create
-> Animation and name it (See Animation Names below for how to name animations)
- Open PowerSprite Animator (see below for details)
- Drag the sprites into the timeline,
- Alternatively, you can highlight the sprites and right click ->
Create Anim from Sprites
, and move it out of the sprites folder
- Set up timing/looping options how you’d like.
Advanced: Using the Sprite Importer: (#manual_spriteimporter}
*(Photoshop/Aseprite only)*
The sprite importer is a quicker way of importing a bunch of sprites or animations from a single file.
It’s used to map in-game sprite files to art source files. Once set up it makes editing and re-importing really quick.
For scenes I find it easiest to have all the props on different layers in my photoshop/aseprite file, and then have each prop layer turned on for one frame. Then I can edit and export the whole scene really quickly whenever I want to make tweaks.

- To Import Sprites:
- When you create a Room or Character, a new folder will be created for it.
- Eg. Assets\Game\Characters\Dave\
- Navigate to that in the Project window (click on the character/room in the Power Quest Panel)
- Select the Importer file in the Character or Room folder. Eg. _ImportCharacterDave
- Set the source PSD or Aseprite file (You can duplicate the importer for each additional source file)
- Add a row for each animation you want to output, and the first frame of each animation. If it’s just 1 anim or 1 frame that’s fine. (See Animation Names below for how to name animations)
- Create Animations:
- Click “Import Sprites” to have sprites imported (you can always delete them and redo if you got something wrong). They’ll be copied to the sprites folder, and be set up and named nicely
- Click
Create Animations
to create animations
- Open PowerSprite Animator (see below for details) and set up timing/looping how you’d like.
PowerSprite Animator
This is another tool I made which comes bundled with this. It makes editing frame by frame animations much easier than using Unity’s default tools. There’s a separate manual pdf for it in the project, but it’s pretty self-explanatory.
Open it by clicking Window->PowerSprite Animator in the taskbar
Animation Names
Props, Inventory: Name the animation the same as the prop or item (eg: Door, Key) and it’ll automatically be hooked up for you.
Characters: Use Idle, Talk, Walk by default, they can be overridden in data, and in scripts
**Directional animations **for characters should end with L, R, U, D, UL, UR, DL, DR (for left, right, up down, up-left, up-right, down-left, down-right).
Eg: WalkR, IdleDL, OpenDoorU.
If there’s only a Left, or Right, then the sprite will be automatically flipped when going the other direction. You can include as few or many directions as you want!