Scale fit?

So here, i have an car tire and i want to put a rim into it, is there any way to make unity detect required scale to make it fit?

Thanks

You can use Bounds to make a bounding box around the Tire and then scale the rim after it.

For the specific code, see the comments above.