- Home /
How to make bounding box of GamObjects visible in scene view
Hi there,
I'm just wondering if it's possible to view the "Bounding Box" of a game object in the scene view the same way that you can see a game object's BoxCollider2D?
Am I right in saying that the visible lines that form a square/rectangle that represent the BoxCollider2D of a game object in scene view are basically the same as the four lines of a Bounding Box?
Any help would be appreciated.
Thanks
Yeah, default colliderbox would basically be the same as it's bounds
Answer by Aluminum18 · Apr 08, 2021 at 10:18 AM
Use [LineRenderer][1]. Using info from [bounds][2] of collider, you can calculate the position of 4 "bounding" points of the box. Then pass those 4 points pos to [SetPositions][3] method of LineRenderer.I'm just wondering if it's possible to view the "Bounding Box" of a game object in the scene view the same way that you can see a game object's BoxCollider2D?
it's true [1]: https://docs.unity3d.com/Manual/class-LineRenderer.html [2]: https://docs.unity3d.com/ScriptReference/Collider2D-bounds.html [3]: https://docs.unity3d.com/ScriptReference/LineRenderer.SetPositions.htmlAm I right in saying that the visible lines that form a square/rectangle that represent the BoxCollider2D of a game object in scene view are basically the same as the four lines of a Bounding Box?
Your answer
![](https://koobas.hobune.stream/wayback/20220613031930im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Selecting objects in scene view with left mouse button always selects child object. 1 Answer
Game object is visible in scene tab,but not in the game tab. 17 Answers
Game objects wont render in scene view (but renders in game view) 1 Answer
using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers