Exporting to Unity

Using the Export to Sprite Sheet and Export to Easel JS buttons in the Game toolbar, you can export your character into a package containing sprite sheets and metadata that can be imported into a game engine.

Specifically, if you use the Export to Sprite Sheet option, your character will be exported as a rigged, animated skeleton with sprites, in a format that can easily be imported using the Harmony Game SDK package for Unity, without any scripting required.

If you use the Export to Easel JS option, your character will be exported with each animation frame rendered as a full body sprite, along with metadata that can be used to import it in Unity. However, you will need to program the logic for importing the spritesheet into Unity yourself.

TIPSince both the Export to Sprite Sheet and Export to Easel JS dialogs are scripts, you can modify them in Harmony's Script Editor view, to make them export in a format that is compatible with your game engine. Those scripts are named TB_ExportToSpriteSheets.js and TB_ExportToEaselJS.js, respectively.

Before exporting your character as a spritesheet, ensure that:

  • The current display is set to Display, or if you added other display nodes to your scene, to a display that shows your entire character rig. If the current display is set to Display All, the exported files will not have any spritesheet.
  • Your scene is saved. Harmony creates the sprites using the drawing files in your scene folder. Hence, any unsaved changes will not appear in the exported sprite sheets.

  • The dimensions of your scene are set to a number that is a power of two, such as 512, 1024, 2048, etc. Graphic cards work with textures the dimensions of which are a power of two.
  • Your character rig is positioned so that the centre of the stage is where you want its pivot point to be.
  • You respected all the guidelines for rigging and animating game assets—see Guidelines for Rigging and Animating Game Characters in Harmony.