Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: skyRider on July 20, 2012, 01:21:40 AM

Title: Attaching BOX Collider at Runtime
Post by: skyRider on July 20, 2012, 01:21:40 AM
Hi All ,

In my scenario i am adding Sprites at Runtime. As i want to take touch on these sprite so the solution is to attach a box collider, How can i attach a box collider to a sprite at runtime as sprite is also creating at runtime.

Help would be appreciated.
Thanks
Title: Re: Attaching BOX Collider at Runtime
Post by: PhilipC on July 20, 2012, 09:45:48 AM
Should be able to just AddComponent<BoxCollider>(); might need to resize it though