Import an animation into Godot 4
Keep the Godot pack's resource paths intact, use its SpriteFrames and ready-to-play scene, and preserve the intended FPS and pivot offset.
On this page
What the pack includes
Export godot_pack to get spritesheet.png, animation.tres, animation.tscn, animgen-manifest.json, and README in a named root folder.
The .tres is a Godot 4 SpriteFrames resource built from AtlasTexture rectangles. The .tscn contains an AnimatedSprite2D using that resource, with autoplay and a pivot-related offset. This is not a Godot 3 AnimatedSprite resource.
Preserve the root path
Extract the package and copy its named root folder into the root of the Godot project. Its README gives the expected res://<exported-folder>/ path.
The generated files contain resource paths using that folder name. Moving only animation.tres, renaming the root folder, or nesting it under another directory without updating references can produce missing textures or missing resources.
Wait for Godot to import the PNG. Then open animation.tscn or instance it in a small test scene.
Choose a ready scene or an existing node
For the shortest path, use the supplied scene. For an existing AnimatedSprite2D, assign animation.tres to Sprite Frames, choose the exported animation, and configure playback.
Godot's 2D sprite animation guide explains AnimatedSprite2D, SpriteFrames, playback, and FPS. The AnimGen resource already contains its frames, loop flag, and speed; you do not need to slice the PNG again.
Assigning the SpriteFrames resource alone does not copy the offset from the generated scene. To preserve a non-centered pivot, also carry over the scene's offset or configure the corresponding origin in your existing node.
Verify timing and alignment
Compare the frame count and FPS with animgen-manifest.json. Check that a parent transform or project script is not changing playback speed or position. Play at least one full loop and compare grounded poses against a fixed line.
If the node shows nothing, first check missing-resource messages, texture import, selected animation, visibility, and scene placement. If frames are wrong, verify you did not mix the texture from one export with the .tres from another.
If edges look different from Studio, inspect the target texture filter and rendering settings using the same PNG baseline. See transparent formats.
Reuse safely
Keep the package's naming and paths when possible. If you reorganize it, update the texture path in animation.tres and the resource path in animation.tscn together, then reopen and test.
Do not treat a passing package-generation test as a runtime test of your Godot project. Complete a small project import before integrating gameplay or exporting to a target device.
Was this page helpful?
No search queries, code, or free text are collected. This switch controls documentation interactions only; general site analytics follow the privacy policy. Privacy policy