I can’t believe how difficult a time I’m having understanding this…
In my scene I am trying to read a custom layer property from Tiled. I have no issue grabbing custom properties from individual tiles or objects in an object layer for example but the following code:
console.log(this.tileMap.getLayer(KEYS.TILEMAPS.LAYERS.FLOOR).properties.depth)
returns undefined
So, to try and figure out what was being held in properties, I used:
this.tileMap.getLayer(KEYS.TILEMAPS.LAYERS.FLOOR).properties.forEach((p) => {
console.log(p);
});
and got…
{name: "depth", type: "int", value: 0}
I know i’m having a brainfart but can someone please explain how I can access the custom layer property’s value as I’m tearing my hair out.