Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: superp on July 22, 2014, 12:20:49 AM

Title: built in screen scroll by mouse?
Post by: superp on July 22, 2014, 12:20:49 AM
Does NGUI provide an out of the box way of implementing dragging screen around the 2d world?
I can define max x and y. I am doing it by creating my own 2d collider and handling things myself but i was wondering if there is a better way.

thanks
Title: Re: built in screen scroll by mouse?
Post by: ArenMook on July 22, 2014, 08:53:29 PM
UIDragObject lets you drag objects. UIDragCamera lets you drag the camera. For anything else, just create a custom script that has OnPress/OnDrag and do what you want inside. If you want this script to work regardless of what you pressed on, set UICamera.genericEventHandler to be the game object where you have this script attached.