prefab instantiation not on same horizantal plane,Improper placement of prefabs

I have generated a logical grid and trying to place a prefab on top of that grid.

Piece is the base class for all pieces

Pieces[] is the 2d array holding all the pieces

1). instantiate and spawn prefab

private Piece spwanSinglePiece()
{
    Piece cp = Instantiate(prefabs[0], transform, false).GetComponent();
    return cp
}

2). Position them

private void PositionSinglePiece(int x, int y, bool force = false)
{
    Pieces[x, y].transform.position = GetTileCenter(x, y);
}
private Vector3 GetTileCenter(int x, int y)
{
    return  new Vector3(x * tileSize, (float)(yOffSet +0.85), y * tileSize) - bounds + new Vector3(tileSize/2,0,tileSize/2);
}

Scenario

  1. only yoffset value is helpful to place them on top of the board
  2. but different prefab pieces require different yoffset value. cause after instantiating they are not on the same base
  3. board scale is set to 1,1,1 so that parenting doesn’t scale the pieces along with it
  4. created prefabs scale is also 1.

Problem
prefabs are not exactly on the same horizontal alignment. which is resulting in the use of different yoffset values for each piece.

if all the pieces are aligned horizontally same they single yoffset value can work this what I am trying to achieve

What’s going on is that you’re moving your chess pieces by the middle of the mesh, and every mesh has different dimensions, so it’s inconsistent.
In my opinion, it would be better to create an empty GameObject, place it at the bottom center of your chess pieces, and then parent the piece to the empty object. Then you can move the pieces through the empty object, which will be always at the bottom of the chess piece ( A convenient point for movement ). Just make sure you move the pieces only through the empty parent. And change the code so it would move the parent, not the piece itself.