I’m trying to load player skin tilesources. They are named like player_SKINNAME.tilesource and global module has the currently selected skin name.
local atlas_path = string.format("/assets/images/player/player_%s.tilesource", global.skin)
go.property("player_atlas", resource.atlas(atlas_path))
init
function init(self)
go.set("#sprite", "image", self.player_atlas)
end
Error is about property being nil