I think that there is a universal script, but I do not have enough understanding. If I use objGroup.create I can’t add the objects I want (by gid or id). createFromObjects adds all objects at once to their places, but does not display them, just black squares
const objLayer = map.getObjectLayer('obj')['objects']
const objGroup = this.add.group()
objLayer.forEach((obj) => {
// objGroup.create(obj.x, obj.y + offsetY, 'fence').setOrigin(0, 1)
objGroup.create(obj.x, obj.y + offsetY, 'lamp').setOrigin(0, 1)
})
or i try
map.createFromObjects('obj', { gid: 326 })