One_Eleven_Android/addons/dialogic/Other/export_plugin.gd
2024-11-10 03:34:28 +03:00

28 lines
822 B
GDScript

extends EditorExportPlugin
func _export_begin(features:PoolStringArray, is_debug:bool, path:String, flags:int)->void :
for feature in features:
if feature == "Android":
return
var file = File.new()
var directory = Directory.new()
var paths = DialogicResources.get_working_directories()
for dir in paths:
if directory.open(paths[dir]) == OK:
directory.list_dir_begin()
var file_name = directory.get_next()
while file_name != "":
if not directory.current_is_dir():
var file_lower = file_name.to_lower()
if ".json" in file_lower or ".cfg" in file_lower:
var file_path = paths[dir] + "/" + file_name
if file.open(file_path, File.READ) == OK:
add_file(file_path, file.get_buffer(file.get_len()), false)
file.close()
file_name = directory.get_next()