Merge pull request #77028 from kleonc/animatedsprite3d-autoplay-error-spam-fix

Fix `AnimatedSprite3D` autoplay warning
This commit is contained in:
Rémi Verschelde 2023-05-15 09:34:12 +02:00
commit 8ff9480c07
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1095,13 +1095,13 @@ void AnimatedSprite3D::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();
}
}
}