Hi,
I recently started exploring godot and got confused by the following:
I want to generate my scene through gdscript by adding all child elements in the _ready function.
This works well, but I noticed something weird. When placing a breakpoint in the _ready function or any called function within it, the breakpoint gets hit, but upon continuing, it keeps hitting again infinitely. Replacing the breakpoint with a print statement shows the print statement being run once though.
my code:
extends Node2D
class_name Main
static var _world_map_tile_view_template = preload("res://Scenes/World/WorldMapTileView.tscn")
static var _world_map_view_template = preload("res://Scenes/World/WorldMapView.tscn")
var _world_map_tile_view:WorldMapTileView
var _world_map_view:WorldMapView
# Called when the node enters the scene tree for the first time.
func _ready():
print("main is ready")
_world_map_view = Main._world_map_view_template.instantiate()
var map:WorldMap = WorldMap.new()
map._generate_map(20,20)
_world_map_view.initialize(map,Vector2(0,0),Vector2(100,100))
add_child(_world_map_view)
Is this normal behavior?