I want to resize my boxcollider 2d...?

90996-boxcollider.jpg

void Update(){

if(slide){

// resize box collider A to box
collider B

}

}

Vector2 sizeB = new Vector2(x, y) // x is the desired width, y hight
myCollider.size = sizeB;

I’d suggest you define the sizeB vector outside of the Update method, so you don’t actually redefine it every frame.

Also, make sure to set slide to false right after you change the size!