Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | TotCac | |
Old Version | Published before Godot 3 was released. |
Hello,
Question about using add_child() in _ready()
If I wrote this:
extends RigidBody2D
func _ready():
var raycast = RayCast2D.new()
raycast.set_cast_to(Vector2(0,vehicle_size))
raycast.add_exception(self)
raycast.set_enabled(true)
add_child(raycast)
will call _ready in loop?
Because every time a child is added (here a raycast), _ready() parent is called (here RigidBody2d)?
Loop, right?