Get each tile properties and data on a layer

So I was trying something and didn’t get it to work.

I’m trying to get the properties of all tiles on a tilelayer and not from a Tilesets

When doing a foreach through a TileLayers I can get .Tiles, if I foreach through that. Visual offers me less possibilities than doing it with Tilesets[0].Tiles

I can’t access the properties from tiles on a layer that easy, I didn’t access it at all.
This happens on Monogame.Extended.Tiled

What I’m trying to do is make that what Teeworlds does. I want to makd a Game Entity Layer.
That tells stuff like, which block is solid, any other things. Spawn points.

I agree the Tiled API could use some improvement when it comes to querying in this way.

If it helps have a read about the TMX map format. That should at least help you understand why it’s currently modeled this way.

Basically to figure out what tile is in a layer you need to lookup what tileset it comes from.

Next time I’m making improvements to the Tiled code I’ll take your feedback into account and implement a bunch of helper methods for this kind of querying.