TBG File Workflow in Unity

In the TBG (Toon Boom Gaming) file workflow, Unity will immediately interpret a TBG file exported from Harmony as a new asset that it can reference to derive new Textures, Sprites, project data, and a Prefab from the file. The resulting Prefab can be dragged into the Unity scene to be immediately viewed and animated. When the TBG file is overwritten from a new export in Harmony, the TBG Importer can automatically perform the re-import process to update the existing prefab, sprites and textures. This allows artists to rapidly iterate on their characters and see their results immediately in-game.

The resulting TBG Renderer prefab contains a full hierarchy of Transforms and SpriteRenderers to display the character in a Unity-friendly rig. Additionally, a TBG Renderer script is included that ensures Sprites are swapped during an animation’s progress and cutters properly apply to relevant SpriteRenderers.

NOTE The XML format used in TBG files is a newer version, and may not be compatible with the XML Folder workflow for more complicated characters. It’s a good idea to keep your original Harmony files and re-export them with different settings later.

 

Adding Inverse Kinematics to a TBG Renderer Prefab

You can utilize Unity’s own 2D Inverse Kinematics feature to add procedural targets to your characters limbs. You can use SLY_Character from the TBG Workflow example scene for this process.