0 votes

I have a Color React parent node that a animationplayer inherits from with an attached signal. I can't seem to get the animation to play, even though I have made sure the Fade-in animation is there and attached.

Please see linked image - https://ibb.co/25pm49F

So the anim exists, but Godot can't seem to find it? :)

Is this a Godot C# bug or I'm I missing something? I have also tried, with the two words's first letters capitalized too.

My C# Code

   var FadeIn = new FadeIn();
        var AnimationPlayer = new AnimationPlayer();

My full Error

E 0:00:02:0917   Animation not found: fade_in
  <C Source>     scene/animation/animation_player.cpp:1142 @ play()
  <Stack Trace>  :0 @ void Godot.NativeCalls.godot_icall_4_115(IntPtr , IntPtr , System.String , Single , Single , Boolean )()
                 AnimationPlayer.cs:329 @ void Godot.AnimationPlayer.Play(System.String , Single , Single , Boolean )()
                 MainMenuScreen.cs:16 @ void MainMenuScreen._Ready()()

Thank you! :)

in Engine by (55 points)

1 Answer

0 votes
Best answer

That code above creates a new AnimationPlayer object. That new AnimationPlayer will not have any animations. According to your screenshot, the FadeIn node where the script is running already has an AnimationPlayer as a child, so you can just call play on it:

by (20,893 points)
selected by

Silly me! Thank you! Would you how know how to change the var FadeIn variable to match the one in the Inspector? As it turns it into a Node variable type?

I got it. thanks again!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.