Using TexturePacker spritesheets with Godot Engine

After some research, I found a good method with some caveats. Since the documentation is a bit weak, I’m writing up some tips here. This post assumes some knowledge of TexturePacker.

  1. Download this Godot plugin (thanks alot to Vinod for making it available).
  2. Unzip the plugin contents to its own folder (e.g. Create_Tileset).
  3. Copy the folder to the Godot plugins folder (on Windows, the folder is here: %Appdata%\Roaming\Godot\plugins some info for Linux and Mac OS X is here).
  4. Launch Godot Engine.
  5. Click on ‘Settings’ then ‘Editor Settings’.
  6. Click on ‘Plugins’ tab – this will likely show a blank plugin list.

    editor-settings-plugins-empty

  7. Click on the Refresh button. If you moved the plugin to the correct folder location, you’ll see the plugin listed.

    editor-settings-plugins-refresh

  8. Click the check-box next to the plugin¬†to enable it. You’ll also see a new menu item appear (next to View).

    editor-settings-plugins-enable-close

  9. Use TexturePacker 3.6.0. or higher since that version enables JSON which is needed for the plugin. Note there are 2 versions of JSON supported by TexturePacker. It seems that the plugin only supports “JSON (Hash)” format, so be sure to set that export format in TexturePacker.
  10. Before exporting your sprite sheet, make sure you disable auto-rotation, since it seems the plugin does not support rotated sprites. See the following for a summary of useful settings:

    tp-settings

  11. When exported, you’ll have a PNG image and corresponding JSON file. These are a set and must be copied to a convenient location, e.g. project folder.
  12. Click on the ‘Create Tileset’ button in Godot. This will show the following dialog:

    create-tileset

  13. Click on ‘Select Image’and choose the PNG, and click ‘OK’.
  14. Thereafter you will see all the sprites in your sheet appear as individual sprite nodes in your scene.

Leave a Reply

Your email address will not be published. Required fields are marked *