I have a plane that can get its scale changed during the game, and I want to make the camera view it completely every time the plane has its scale changed. The only camera is set to perspective projection.
I found this page which tells me how to resize the plane (I do not understand the unity of measure used there) to be viewed by the camera, and I want the reverse.
I found something similar here.
I also found other not-very-relevant answers by googling "unity camera fits a plane", "unity move camera to show an object" (one of the results is this), "unity field of view to fit an object" (one of the results is this).
I think I found the answer here, but it is hard for me to do the maths right now. I also found an answer here but I wish that someone explained me the mathematics (also, I do not know how to get the
My relevant previous question with the same situation is here. There is a link to download a sample project, and a few screenshots.