Renderer.boundsvar bounds : BoundsDescriptionThe bounding volume of the renderer (Read Only). This is the axis-aligned bounding box fully enclosing the object in world space. Using bounds is convenient to make rough approximations about the object's location and its extents. For example, renderer.bounds.center often is more precise "center of the object" than transform.position - especially if the object is not symmetrical. See also Mesh.bounds property that returns bounds of the mesh in local space.
JavaScript
// Prints the left extreme point of the bounding volume on the x-axis using UnityEngine; import UnityEngine Another example:
JavaScript
// Draws a wireframe sphere in the scene view, fully enclosing using UnityEngine; import UnityEngine |
