mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Fix AnimatedSprite2D autoplay warning
Changing of autoplay when changing `SpriteFrames` is not done by the user and warning is unhelpful
This commit is contained in:
@@ -301,13 +301,13 @@ void AnimatedSprite2D::set_sprite_frames(const Ref<SpriteFrames> &p_frames) {
|
||||
frames->get_animation_list(&al);
|
||||
if (al.size() == 0) {
|
||||
set_animation(StringName());
|
||||
set_autoplay(String());
|
||||
autoplay = String();
|
||||
} else {
|
||||
if (!frames->has_animation(animation)) {
|
||||
set_animation(al[0]);
|
||||
}
|
||||
if (!frames->has_animation(autoplay)) {
|
||||
set_autoplay(String());
|
||||
autoplay = String();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user