How to set parameter to tiles

Hi, I’m using tilemap.
I want to set “move cost” to each tile type.
What is the smart way to get the cost?
I’m using TileMap.GetTile (tile Position).name and compare the string with Dictionary I made. But I feeling this isn’t smart way to implement.

Is there any good way to link Tilemaps.Tile with specific data?
Thanks.

I havent used the Tilemap system but these docs suggest you can subclass TileBase

You can store a separate two dimensional array of your custom tile object that map back to the tile map based on x,y.
So you can reference them like MyTile tile = myTiles[y]

But honestly based on docs @Statement shared, Unity has a way to implement tile map with your own custom tile. That would probably be most people’s preferred method.