Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: xiaoniaojjj on September 21, 2012, 05:11:14 AM
-
How to create a "Box Collider" easy to fit the size of Widgets. or only by Manual Hand?
-
There is a convenience function will will either create a collider or re-size an existing collider to the size of the widget (including children). The shortcut in the editor is alt + shift + c and I think the code is in NGUITools.cs. I don't have the code open right now so I can't verify the class it's in, just look in the NGUI menu and search the code for the "make a collider" and you'll see where it is.
-
NGUITools.AddWidgetCollider(GameObject); //returns the collider