From c55c1d3563551517197760b24c48e657abd3c6d0 Mon Sep 17 00:00:00 2001 From: pietru Date: Fri, 16 May 2025 19:30:37 +0200 Subject: [PATCH] small test --- scripts/hello.gd.txt | 4 ++++ test.tscn | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 scripts/hello.gd.txt create mode 100644 test.tscn 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")