Vector3[] vertices = sphereMesh.vertices; // get the vertices of the sphere Bounds bounds = new Bounds(sphereTransform.position, Vector3.zero); // create a new bounds object at the sphere's position foreach(Vector3 vertex in vertices) // loop through each vertex { bounds.Encapsulate(vertex); // add the vertex to the bounds } Debug.Log("Sphere bounds: " + bounds); // print the bounds to the consoleIn this example, we first get the vertices of the sphere using the Mesh component. We then create a Bounds object centered at the sphere's position with a size of zero. Finally, we loop through each vertex and use the Encapsulate method to add it to the bounds object. We then print the bounds to the console. The UnityEngine.Bounds class is part of the Unity Engine package library.