diff --git a/scripts/hello.gd.txt b/scripts/hello.gd.txt new file mode 100644 index 0000000..6c5dd93 --- /dev/null +++ b/scripts/hello.gd.txt @@ -0,0 +1,4 @@ +extends Node + +func _ready(): + print("Hello world with no .UID files!") diff --git a/test.tscn b/test.tscn new file mode 100644 index 0000000..27b8b5a --- /dev/null +++ b/test.tscn @@ -0,0 +1,21 @@ +[gd_scene load_steps=2 format=3 uid="uid://b71653f53iyqe"] + +[sub_resource type="GDScript" id="GDScript_unn25"] +script/source = "extends Node + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + var scripts_dir = \"res://scripts/\" + for file in DirAccess.get_files_at(scripts_dir): + if file.ends_with(\".gd.txt\"): + var node = Node.new() + var script = GDScript.new() + script.source_code=FileAccess.get_file_as_string(scripts_dir+file) + script.reload() + node.set_script(script) + add_child(node) +" + +[node name="Node" type="Node"] +script = SubResource("GDScript_unn25")