RaRa_SpriteSystem RaRa Sprite Slicer - robblofield/Tomebound-Docs GitHub Wiki

RaRa Sprite Slicer Tool – User Guide

Purpose

The RaRa Sprite Slicer Tool automatically slices horizontal-row .png spritesheets into individual animation frames based on their pixel dimensions. It ensures every slice is registered correctly in Unity as part of a multi-sprite import, ready to be assigned to character profiles.


Access

Menu: Tools > RaRa Games > Sprite System > 2. RaRa Sprite Slicer

This tool should be used after renaming, before assigning frames in the Profile Editor.


Requirements

  • Filenames must follow this format:

<Character><Action><Direction>.png

Examples:

HoodedDrifter_Run_UpRight.png Knight_Idle_Down.png

  • Spritesheets must be arranged as a horizontal row of frames, with all frames being square and of equal height.
  • The number of frames is calculated by dividing the texture's width by its height.

Usage Instructions

🔢 Step-by-Step

1. Select Spritesheets

  • Select any number of .png textures in the Project window.

2. Queue Files

  • Click “Queue Selected PNGs” (renamed from “Add Selected Textures from Project”).
  • The tool will show each queued file and automatically preview how many frames it will slice based on its dimensions.

3. Review

  • The preview shows the file list, frame count per sheet, and readiness for slicing.

4. Slice Sprites

  • Click “Slice Sprites” to perform slicing.
  • The tool will:
    • Enable Sprite mode (Multiple)
    • Create Unity Sprite metadata (SpriteMetaData[])
    • Apply names: <OriginalFileName>_0, _1, _2, etc.
    • Save the changes directly to the .png import settings

5. (Optional) Clear Queue

  • Use "Clear Queue" to remove files from the list before slicing.

Batch Capabilities

Can Slice... Supported
Multiple Characters
Multiple Actions
Multiple Directions

🧠 Tip: You can slice an entire folder of prepared .png files in one click.


Output

  • Unity automatically slices each file into N frames.
  • The frames are saved inside the .meta file of the original .pngno duplicate textures are created.
  • Each frame is named in order:

HoodedDrifter_Run_UpRight_0 HoodedDrifter_Run_UpRight_1


Example Workflow

File Name Image Size Frame Count Output Frame Names
Goblin_Attack_Left.png 384×64 6 Goblin_Attack_Left_0Goblin_Attack_Left_5
Knight_Idle_DownRight.png 512×64 8 Knight_Idle_DownRight_0Knight_Idle_DownRight_7

Common Pitfalls

  • ❌ File name doesn’t follow convention → Slicing skipped
  • ❌ Height is not square or consistent → Incorrect slicing
  • ❌ File is already sliced incorrectly in another tool → Overwrites safely, but best to reimport cleanly

Notes

  • The tool uses Unity’s (now obsolete) spritesheet array to apply metadata — this still functions reliably, but future updates may adopt the ISpriteEditorDataProvider interface when needed.
  • Slicing applies in place — it does not move, duplicate, or modify the .png outside of metadata.

Next Step

➡️ Proceed to the RaRa_SpriteSystem - RaRa Sprite Profile Editor User Guide to assign sliced animations to character profiles.

⚠️ **GitHub.com Fallback** ⚠️