Why, when using the get_tile_poroperties command am I unable to get the default propreties of a tile like its height or width. I ask this because in my code I need the height of the tile images for rendering it, but when you ask for the tile properties and the tile in question has no extra custom properties the command only returns None. Is there a way to fix this?
You should specify what library/loader/engine you’re using. get_tile_properties
is not something built into Tiled, and it’s unclear from your post whether this method is even the correct one to use, different libraries may have completely different functions with this name.
Tiled’s native tileset formats do not always store the size of each tile, as that is usually redundant. Many Tiled libraries reflect this. For “Based on Tileset Image” tilesets, you can get the tile size from the tileset, as it’s the same for all tiles. For “Collection of Images” tilesets, if the tile size is not included with the tile, you can calculate it from the image rect if present, or fetch it from the image otherwise (that’s the “default” value).
so I am coding in python using the pytmx libery
Thanks, that works.