From 9307f514fe0c18c94ebf2e0b5dc4e9f2be9de4b9 Mon Sep 17 00:00:00 2001 From: KarimAkra Date: Tue, 29 Apr 2025 17:05:20 +0300 Subject: [PATCH] Added safety checks for ASTC textures --- project.hxp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/project.hxp b/project.hxp index 1a8461242..5a380526a 100644 --- a/project.hxp +++ b/project.hxp @@ -1161,9 +1161,10 @@ class Project extends HXProject { // path, rename, type, embed, setDefaults if (Path.extension(path) == 'png' && FEATURE_COMPRESSED_TEXTURES.isEnabled(this)) { - if (!isASTCExcluded(path)) + final astcPath:String = "astc-textures/" + path.substr(0, path.length - 3) + "astc"; + if (!isASTCExcluded(path) && FileSystem.exists(astcPath)) { - path = "astc-textures/" + path.substr(0, path.length - 3) + "astc"; + path = astcPath; if (rename != null) rename = rename.substr(0, rename.length - 3) + "astc";