11 lines
377 B
GDScript
11 lines
377 B
GDScript
extends Node
|
|
|
|
const button = preload("res://scenes/gui/construction_button.tscn")
|
|
|
|
func _ready() -> void:
|
|
for file in ResourceLoader.list_directory("res://generic/prototypes/"):
|
|
var btn = button.instantiate()
|
|
var loaded_prototype : Prototype = ResourceLoader.load("res://generic/prototypes/"+file)
|
|
|
|
btn.get_node("Button").prototype = loaded_prototype
|
|
add_child(btn)
|