Godot Version
4.3 stable
Question
Is it expected behavior that declared methods _physics_process(), _input(), _process(), etc. are ignored if the script which contains them is attached to a node after _init() has been called?
For example, setting the script onto the node in _init() results in the expected behavior:
Figure 1
When I run the game, _physics_process() is called:
Figure 2
However, if I attach the script in _ready():
Figure 3
then the process callbacks are seemingly ignored. Is this because process callbacks are set when the node is added to the tree?
The context for this is that I’m messing around with dependency injection and am trying to get a reference to a Camera3D child of CharacterBody3D i.e.:
I am trying to inject the Camera3D reference from the ‘PlayerModel’ into the Player : WorldObject (see Figure1)
WorldObjects are psuedo-abstract data types which inherit RefCounted
Any help, clarification, and/or suggestions would be greatly appreciated! Thank you.