Error: Animation '' doesn't exist

Godot Version

Version 4.5

Question

Every time I click on either my AnimatedSprite2D, AnimationPlayer or AnimationTree node, i get this error message:
ERROR: Animation '' doesn't exist.
I’m not sure what is causing this.
Here is all the relevant code from my player script:

func _ready():   
 animation_tree.active = true

func _process(delta):
    update_animation()

func update_animation():
    #Flip sprites
    var direction = Input.get_axis("move_left", "move_right")
    if direction > 0:
        animated_sprite.flip_h = false
    elif direction < 0:
        animated_sprite.flip_h = true
    
    #run and idle
    animation_tree["parameters/conditions/is_idle"] = velocity.x == 0
    animation_tree["parameters/conditions/is_running"] = velocity.x != 0```

Here are what my AnimatedSprite2D, AnimationPlayer and AnimationTree node look like too:

I managed to solve my issue! It turns out I had a condition between the start and idle node (is_idle). Removing it stopped the error from showing up. im not particularly sure why or how that solved my issue, but i sure am glad it did lol. my guess is that since i had a condition set up, it considered the animation node start state as an animation, and since its not, its just empty hence the '' animation

1 Like