Renderer.bounds Manual     Reference     Scripting  
Scripting > Runtime Classes > Renderer

var bounds : Bounds


The 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, 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.

// Prints the left extreme point of the bounding volume on the x-axis
// Prints the right extreme point of the bounding volume on the x-axis

// Draws a wireframe sphere in the scene view, fully enclosing
// the object.
function OnDrawGizmosSelected () {
// A sphere that fully encloses the bounding box
var center =;
var radius = renderer.bounds.extents.magnitude;
// Draw it
Gizmos.color = Color.white;
Gizmos.DrawWireSphere (center, radius);

See Also: Bounds class, Mesh.bounds property.