Hi so I’ve been developing some code and have encountered an issue. For those familiar to AS3 you’d know that if you have for example:
var _gmCase:MovieClip() = new MovieClip();
var _gm1:MovieClip = new Object1(); //has a width and height of 5
var _gm2:MovieClip = new Object2(); //has w width and height of 5
trace(_gmCase.width); //returns 20. // includes the width and distance between furthest object to the left and furthest object to the right.
What I’m trying to get in unity is access the “_gmCase.width”, but its an empty GameObject width “_gm1” and “_gm2” attached as children in the Hierarchy and has no Renderer or any other component of any sort apart from my script which is trying to access its width.
“_gm1” and “_gm2” are prefabs and have Renderers and meshes as well as Colliders attached to them.
Please note that “_gmCase.GetComponent().bounds.size.z;” tells me that there is no Renderer attached to the object.
Anyone know of a way to get the Gameobject’s width without any components attached to it?
@Oribow: you could have used Vector3.Scale(a, b), which does exactly the same as your MultVect method. Only to let it registered, as it can be useful for future readers.