I have a game scene in which several different prefabs are slowly added. I would like to find the height of the highest object, so I can have the camera adjust its height as more and more prefabs are added. Does anyone have any idea how to do this? Also, just to clarify, by greatest height, I mean the greatest y coordinate of all the different prefabs.
Declare a float and run through every prefab in the scene and keep the maximum Y position. You can use Mathf.Max(f, f) to do it. As you spawn prefabs, get the Y position of every new prefab you instantiate and Mathf.Max it with your float. The result will always give you the highest Y position among your current scene prefabs.