-
-
Notifications
You must be signed in to change notification settings - Fork 23.8k
Open
Description
Tested versions
- Reproducible in 4.5.1 stable version.
System information
Window 11
Issue description
When create an animation in SpriteFrame and assigned to AnimatiedSprited3D, Godot editor write a line in *.tscn to keep track of the activate animation with the name. But when user delelted the animation, Godot editor sometimes does not update the *.tscn file and keep the old non-existing animation name in it. It caused ERROR: Animation '{some name}' doesn't exist. when user run the project.
Since user cannot fix this problem inside editor, when it occurred, user needs to use text editor to change the tscn file manually or delete the whole *.tscn (i.e. the entire scene), which is pretty bad.
Steps to reproduce
To reproduce it:
- Create a new project.
- Create a new scene using AnimatedSprite3D type. (Click +Other Node -> AnimatedSprite3D)
- Create a new SpriteFrame resource with default name "new_sprite_frames.tres" in FileSystem and in the SpriteFrame editor window, create a new animation with default name "new_animation" under default animation.
- In AnimatedSprite3D's inspector window, assign "new_sprite_frames.tres" to Sprite Frames property and "new_animation" to Animation property.
- Run the project to save the current scene information in to "animated_sprite_3d.tscn"
- Stop the running window and delete the "new_animation" in SpriteFrame editor window.
- Save & Quit the project without running the project second time.
- Before launch Godot again, you can check in "animated_sprite_3d.tscn" there is a [animation = &“new_animation”]. But we already deleted it in step 6.
- Because of (8), the non-existing animation name will be there forever. Everytime user run the project will get the "ERROR: Animation 'new_animation' doesn't exist." error message.