Godot Version
v4.3.stable.official [77dcf97d8]
Question
When I use the ResourceSaver to save a file, the object names are prefixed with a @
… If I save/reload the file they are prefixed with a _
. How can I stop this from happening? My connections only work after I open/save an additional time.
Here’s the bit of code that performs these operations:
func _on_save_project_dialog_file_selected(path: String) -> void:
var graph_data = GraphData.new()
graph_data.connections = $GraphEdit.get_connection_list()
for node in $GraphEdit.get_children():
if node is GraphNode:
var node_data = NodeData.new()
node_data.name = node.name
node_data.position_offset = node.position_offset
node_data.data = node.data
graph_data.nodes.append(node_data)
ResourceSaver.save(graph_data, path)
func _on_open_project_dialog_file_selected(path: String) -> void:
var graph_data = ResourceLoader.load(path)
open_project.emit(graph_data)
Any help is much appreciated.