Zoom in out Button(UI) with Camera Zoom

In my Game, When Player instantiate a prefab, with their prefab 2 button is enabled for Delete and Move instantiated prefab, player also “Zoom in or out” camera.

My Question: when Player zoom camera at a time prefab “zoom out and zoom in” will work perfectly but Button is remain same size, I want to zoom in and zoom out Button too.

Here is when I placed Prefeb


when I zoom camera


For Placing button I used Canvas UI.

Code for placing button at newpart(prefab) size.

public RectTransform partSet;
void PartSetting(){
		Vector3 ab=Camera.main.WorldToViewportPoint(newPart.transform.position);
		partSet.anchorMin = ab; 

So, how can i Zoom UI Button with Camera ?

You can move and resize button accordingly to your camera movement on Update function (like you already do in your PartSetting function but resize as well[depending on distance between camera and your object]) because you use either Overlay (which is even before camera) or Camera (which is stuck to your camera) render mode. Though the most obvious and easiest one would be just to use WorldSpace render mode and if needed force it to LookAt camera.