Browse Source

Fix AnimatedSprite3D autoplay warning

(cherry picked from commit d3d84d90de79e086a78b80659c987f71283e3cd1)
kleonc 2 years ago
parent
commit
3af3e88d81
1 changed files with 2 additions and 2 deletions
  1. 2 2
      scene/3d/sprite_3d.cpp

+ 2 - 2
scene/3d/sprite_3d.cpp

@@ -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();
 			}
 		}
 	}