RendererExtensions¶
Namespace:
SideXP.Core
Extension functions for Renderer components.
Methods¶
GetRendererBounds(Renderer)¶
Gets the bounds of a renderer.
Parameters
renderer: The renderer of which to query the bounds.
Returns
Returns the renderer bounds.
Remarks
Contrary to colliders (see GetColliderBounds), a mesh renderer's bounds is populated even when the game is not running, so it can be read directly here.
GetRendererBounds(Renderer, Bounds)¶
Gets the bounds of a renderer.
Parameters
renderer: The renderer of which to query the bounds.bounds: Outputs the renderer bounds.
Returns
Always returns true (every Renderer exposes bounds).
Remarks
Contrary to colliders (see GetColliderBounds), a mesh renderer's bounds is populated even when the game is not running, so it can be read directly here.