extends FileDialog func _on_FileDialog_ready(): popup_centered() func _on_FileDialog_dir_selected(dir): var d = Directory.new() d.open(dir) if not d.file_exists("Giants.exe"): return var f = File.new() f.open("res://dir.txt", File.WRITE) f.store_string(dir) f.close() get_tree().change_scene("res://3d.tscn") func _on_FileDialog_popup_hide(): popup_centered()