how would i get the number of saved patterns?

Godot Version

4.4

Question

so i have a tile map layer with some patterns on it. currently Im using a while loop to get all of the patterns sequentially until it gives me null. this approach works but it is giving me an error. its not stopping me from running the game, but it is slightly annoying when i forget its there. is there any way to get the number of patterns currently attached to the layer?

The patterns are part of the TileSet. You can get the amount of patterns with TileSet.get_patterns_count()

thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.