Эх сурвалжийг харах

fix: run script in wrong path

LanzaSchneider 1 жил өмнө
parent
commit
c6bfb02d23
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      tblext.gd

+ 1 - 1
tblext.gd

@@ -12,7 +12,7 @@ func _enter_tree() -> void:
 		if file.get_extension() == 'rb':
 			var json_path := _tool_json_root_path.path_join(file.get_basename()) + '.json'
 			if FileAccess.file_exists(json_path):
-				make_panel(ProjectSettings.globalize_path(json_path), ProjectSettings.globalize_path(file))
+				make_panel(ProjectSettings.globalize_path(json_path), ProjectSettings.globalize_path(dir.get_current_dir().path_join(file)))
 
 func make_panel(tool_json_path:String, tool_script_path:String) -> VBoxContainer:
 	var panel := VBoxContainer.new()