3.8.2 TiledMap does not support reading custom properties of tiles

  • Creator version: 3.8.2
  • Target Platforms

  • Reproduction method: directly set custom properties for the tiles in the tiled editor, and found that there is no process that can read the properties.

Here, a canMove is set on the tile, not on the map.

  • First error: No error reporting function is missing

This is because the object read by the browser has no custom properties at all.
And the grid layer is also wrong.

2 Likes

Did you solve it? I have the same problem, all custom properties are undefined

Solved it but I forgot how to solve it. It seems that the attribute is in a very strange place.

let objLayer = this.curMap.getObjectGroup(“object”);

    let objs = objLayer.getObjects()

    let list = objs.map(x => {

        let tileGoords = this.mapUtils.PixelToTileCoords(v2(x.x, x.y))

        let properties = this.curMap._tileProperties.get(x.gid)

        // if (properties.kind == 20)

        return `${tileGoords.x},${tileGoords.y},${properties.kind}`

    })
1 Like