Jelajahi Sumber

fix: run script in wrong path

LanzaSchneider 1 tahun lalu
induk
melakukan
c6bfb02d23
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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()