Change size box collider


I want to make a script so I can change the size of the box collider when I click on a object.
What kind of script can I use in c#?

Get a reference to the Collider:
BoxCollider col = GetComponent ()

Then set col.width = desired size (Width might not be the right property. You might want to check the documentation to see what variables you can modify in the BoxCollider)

Let me know if that helps or not. I would be happy to elaborate. :slight_smile: