Test packing assets into project file

This commit is contained in:
Lubos Lenco
2021-12-18 11:30:45 +01:00
parent fad8c45182
commit f374b53120
+5
View File
@@ -157,6 +157,11 @@ class ExportArm {
Krom.writePng(Project.filepath.substr(0, Project.filepath.length - 4) + "_icon.png", mesh_icon_pixels.getData(), 256, 256, 0);
#end
var isPacked = Project.filepath.endsWith("_packed_.arm");
if (isPacked) { // Pack textures
packAssets(Project.raw, Project.assets);
}
var bytes = ArmPack.encode(Project.raw);
Krom.fileSaveBytes(Project.filepath, bytes.getData(), bytes.length + 1);