It doesn’t matter what I do but the tilemap.getTile function always seems to return Null, even though I clearly placed a tile on that position right before.
Not sure, but maybe the problem is that the z value of of player.transform.position is ignored when setting the tile, but not when trying to get it. What happens if you cast the player position into a Vector2 first or set the z to 0?