Godot Version
4.6.2
Question
I have a custom file importer, and this is my import method, it simply places each line of the file in a PackedStringArray in a resource. The resource saves and everything is well, but when in project, the PackedStringArray is printed as empty ( [ ] ).
In the .godot/imported, the tres file does not have the content either.
func _import(source_file, save_path, options, platform_variants, gen_files):
var file = FileAccess.open(source_file, FileAccess.READ)
if file == null:
return FAILED
var csl = CSLScript.new()
while file.get_position() < file.get_length():
csl.lines.append(file.get_line())
var filename = save_path + "." + _get_save_extension()
return ResourceSaver.save(csl, filename)