Topic was automatically imported from the old Question2Answer platform.
Asked By
cloa513
extends Node2D
var scene = preload("res://tile.tscn")
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var scene_instance
# Called when the node enters the scene tree for the first time.
func _ready():
for i in 729:
scene_instance=scene.instance()
$tileContain/GridContainer.add_child(scene_instance)
It is adding those children, You can look them up in Remote Tab of editor, when project is running. I don’t see You setting any properties of those tiles, are You sure their size flags enable them to be visible in grid container ? You should have some minimal size, expand or fill, there should be some icons too. Try adding tiles to your gridcontainer in the editor, if it also won’t work, than it means there is a problem with your GUI settings, not a code.