- Home /
Question by
tonycoculuzzi · Nov 22, 2011 at 01:54 AM ·
gameobjectchildrenwidth
Is it possible to get the width (in unity units) of a GameObject including all of its children?
I'm wondering if it's possible to get the real width (in unity units) of a GameObject and all of its children.
Comment
Unity uses the metric system by default... I think ;).
Answer by DaveA · Nov 22, 2011 at 02:02 AM
Use 'Bounds'. You can use Renderer.Bounds and loop through all children in a Transform, unioning the bounds as you go.
Your answer
Follow this Question
Related Questions
Instantiate GameObject, GetComponentsInChildren Cast Type Error - JS 1 Answer
How to check parent value instead name value(more details in post) 3 Answers
Destroy Child Object(s) OnValidate? 6 Answers
Is it possible to FindWithTag only within children of a certain gameObject? 1 Answer
Destroy created children of objects 1 Answer