Is it possible to scale one end of an object in all directions while keeping the other side the same?,Is it possible for a Cube to have one half scaled larger than the other half?

I am currently developing a 3D modelling program and one of the objects I am working with requires the ability to rescale the object on one end while keeping the other the same, and some objects may require scaling on both ends. If there is any possible way to do this within Unity and someone could answer this question or even provide a solution that would be much appreciated. To elaborate a bit more here is an image of what I mean. In the image on the left there is a cube where the front face is smaller than the back side of the cube and vice versa for the image on the right. If there is any solution at all please comment and left me know

,I am currently making a 3D modelling program for a company. I am trying to figure out how to scale the ends of the object I am working with. For this post, I will use the example of a cube. Something similar to this image, where one end is bigger than the other in all directions. If this is at all possible within Unity and someone could please provide me with a solution, that would be much appreciated! Thanks!

You would have to access the vertices of the mesh of the MeshFilter component:

Mesh mesh = GetComponent<MeshFilter>().mesh;
Vector3[] verts = mesh.vertices;

There you have an array of the vertice positions of the mesh. Now you would have to find the vertices that you want to move which is somewhat of a difficult task, but once you know which verte you want to move, you would set the new positions while keeping them at the same indexes in the array copy and then you would have to set the mesh.vertices to your newly modified array.