TileMapLayer width and height?

Godot Version

4.6

Question

I have looked and don’t see a way. Is there a way to get a TileMapLayer’s Width and Height easily?

I thought there would be exposed properties, but I didn’t see anything obvious.

I can slap a node over it and size it to the same size, and use that instead. It would work but seems a little hokey.

Apologies if this has already been answered somewhere.

Answered by @tomyy here:

As mentioned there you can use: get_used_rect

Wow thank you for that. I thought I must be nuts for not seeing that, but it appears my Intellisense in Rider is acting strange, because that method is missing. It’s not the only one. Need to look into what that’s about lol.

Maybe check and see if you accidentally turned on a Claude based autocomplete or something. That won’t work.

Personally I prefer the shipped gdscript editor.

Oh and if you do use gdscript, make sure you explicitly assign the type to your vars, otherwise no autocomplete.