Where are signal connections, grouping and other gui based settings stored?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By psear

Not sure if this has been asked, but in the gui you can connect a signal to a function in your code. Where is the fact that this connection has been made stored? It’s not in the script itself (other than the function). There are other bits and bobs like values that you edit in the gui for variables with the export keyword. Where do these things which are not in the script itself get stored?

:bust_in_silhouette: Reply From: aezart

These are stored in the .tscn file for the scene itself. The file is text-based and you can open it in a text editor to see the contents. For example, this is what my game’s EventSystem.tscn looks like:

[gd_scene load_steps=2 format=2]

[ext_resource path="res://entity/EventSystem.gd" type="Script" id=1]

[node name="EventSystem" type="Node2D"]
script = ExtResource( 1 )

[node name="Timer" type="Timer" parent="."]
one_shot = true
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]

Note the [connection] block; that’s where the signal is defined.