Skip to content

Commit 93b2860

Browse files
committed
made Assets.exists check for ASTC over PNG for now
1 parent 4bbaace commit 93b2860

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/openfl/utils/Assets.hx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ class Assets
7575
public static function exists(id:String, type:AssetType = null):Bool
7676
{
7777
#if lime
78+
if (id != null && StringTools.endsWith(id, 'png') && type == null || type == IMAGE)
79+
{
80+
if (LimeAssets.exists(id.substr(0, id.length - 3) + 'astc', BINARY)) return true;
81+
}
7882
return LimeAssets.exists(id, cast type);
7983
#else
8084
return false;

0 commit comments

Comments
 (0)