Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

Problem with the file name containing '@' symbol in the AssetManager #1006

Closed alevys closed 6 years ago

alevys commented 6 years ago

Hi! Trying to load assets file by name containing '@' symbol and get the error.

var appDir:File = File.applicationDirectory;
var assets:AssetManager = new AssetManager(Starling.contentScaleFactor);
assets.enqueue(appDir.resolvePath("assets/rod/rod_body_atlas_@2.xml"));
assets.enqueue(appDir.resolvePath("assets/rod/rod_body_atlas_@2.atf"));
[AssetManager] Enqueuing 'rod_body_atlas_@2.xml'
[AssetManager] Enqueuing 'rod_body_atlas_@2.atf'
[AssetManager] Adding texture 'rod_body_atlas_%402'
[AssetManager] Cannot create atlas: texture 'rod_body_atlas_@2' is missing.

See screenshot: https://ibb.co/mwgWhm

PrimaryFeather commented 6 years ago

You're right, I was overdoing it here with url safeness. :wink: This should now work as expected!