–1 vote

I have this scene, which is autoloaded:

CanvasLayer (root with attached script)

  • AnimationPlayer (Schrodinger's node)
  • Control (presumably unrelated stuff)

    • ColorRect

but whether I reference AnimationPlayer in the script linked to CanvasLayer with

$AnimationPlayer

or

get_node("AnimationPlayer")

or

get_node("/root/Scene/AnimationPlayer")

(which I think all refer to the same AnimationPlayer node as in the autoloaded scene?), I am getting "node not found: AnimationPlayer". It's treated like it exists in the IDE autofilling functions, etc. and worked before I changed the file structure (and also updated all location references I could find), but now it seems to refuse to acknowledge this node.

Why is it no longer working? How do I fix it? What embarrassing noob mistakes have I made with my structures?

in Engine by (23 points)

1 Answer

0 votes
Best answer

Fixed it myself!

I did make an embarrassing mistake.

I autoloaded the script instead of the scene. :facepalm:

by (23 points)
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.