[Solved] Load local image file not declared under Resources?

Hi everyone,

I’m trying to create a level editor for a (desktop) game. I have figured out how to save/load level data as JSON files. But I would also like to allow the player to use custom thumbnails and tiles for their levels, which means I need to find a way to access external image files, stored on the user’s machine, that are not declared in Resources. Any ideas on how this could be done (via JavaScript if necessary)?

Any help would be appreciated.

You can indeed use the javascript for that, see the example Load image from url.
And replace the URL by a path to the new file.
Like an image in a mods folder near of your game.exe you should write
instead the URL something like

FileSystem::ExecutableFolderPath()+FileSystem::PathDelimiter()+“mods”+FileSystem::PathDelimiter()+“image_mod.png”

Check my expression, take a look on the filesystem API and ajust the expression as you wish.

4 Likes