← back to roto on ba3a.dev

GodotFramesWriter

Writes the text of a Godot 4 SpriteFrames resource (.tres) that shows published frame PNGs. It carries no uid: Godot adds one on import. Lines end in \n, and numbers never pass through a locale.

Functions

Link copied to clipboard
fun write(animations: List<GodotAnimation>, resRoot: String): String

The resource holding animations in the order given. Each distinct frame file is one texture, numbered by first use. resRoot is the folder of the Godot project relative to the consuming project's root, where res:// starts, or empty when they are the same folder; a frame outside it is refused with an IllegalArgumentException.