Trying to instantiate a new Node when attaching a script

Godot Version

4.2.2

Question

Is there any type of callback/notification/signal sent when attaching a script to an Object in the scene tree?

Scenario: I have a Node in the scene tree called “Player”. When I attach my player.gd script to that Object in the editor. I want player.gd to instantiate a new Node and add it as a child to the “Player” node in scene.

1 Like