Hello, is it somehow possible to check if an animation exists before playing it? Something like this:
public void SetAnimation(string animation, bool loop) {
if (!GetAnimationState().HasAnimation(animation))
return;
GetAnimationState().SetAnimation(animation, loop);
}
I'm using Godot 4.4.1 C#/mono. I have already tried wrapping it in a try-catch
but it throws an error anyways, and it breaks the game. How can I fix this?