I have a state machine that travels to an animation when a variable it's true, but when the animation finishes, it just doesn't play any animation, and I want it to loop until the variable changes to false. Is there any way to loop this animation without going to blender and adding “-loop” to the animation? I have already activated the loop in the animation player, but that only loops the animation while in the editor, not the game.

  • Okay, I managed to fix it. For those having this problem, this is how I solved it: In the animation player, add -loop at the end of the animation's name. (Example: Idle → Idle -loop). After that, go to the animation tree (state machine) and add the animations with the new name. The animation tree doesn't change them, and it treats the animations with the original name as other animation, so just remove them and add the other ones. After that, just change the name of the animations in the script, and you're done. Hope that helps.

Okay, I managed to fix it. For those having this problem, this is how I solved it: In the animation player, add -loop at the end of the animation's name. (Example: Idle → Idle -loop). After that, go to the animation tree (state machine) and add the animations with the new name. The animation tree doesn't change them, and it treats the animations with the original name as other animation, so just remove them and add the other ones. After that, just change the name of the animations in the script, and you're done. Hope that helps.

8 months later