Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: ddfire on July 01, 2013, 04:21:29 PM
-
Hi,
i was using a plane but now i changet to a UITexture, so i sue all the same in the UI and do not mix different stuff... but i need a replacement for
"Vector3 bl = mask.renderer.bounds.min"
i tried
Vector3 bl = NGUIMath.CalculateAbsoluteWidgetBounds(mask.transform).min;
and
Vector3 bl = NGUIMath.CalculateWidgetCorners(mask.GetComponent<UITexture>())[0];
but both gives me the same... and it is not correct... i think they are not in worlds coords...
Thanks!!!
-
That value is in world coordinates. NGUI comes in source code form. Just open up the function and see what it does.
Keep in mind NGUI's widgets are all scaled by UIRoot, usually by 2 / Screen.height.