unity NGUI tutorial scroll view
2015-12-04 14:33
459 查看
Scroll views are extremely simple to make in NGUI. Select a widget, Right-Click -> Create ->Scroll View.
To make it possible to navigate the scroll view using mouse or touch events you will need one or more colliders with UIDragScrollView script attached. NGUI makes it easy for you. Right-click
on any object with a collider inside the scroll view and choose Attach ->Drag Scroll View.
Note that if you have many colliders inside your scroll view, you will need to attach the Drag Scroll View script to all of them. In this example all "NGUI" images
have colliders, and so does the Scroll View Background sprite.
You can improve your scroll view further by specifying a Scroll Bar. Give it a try!
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
同时滚动视图是极其简单的。选择一个小部件,单击右键- >创建- >滚动视图。
可以导航滚动视图使用鼠标或触摸事件,你需要一个或多个对撞机附带UIDragScrollView脚本。同时方便给你。右键单击任何对象的对撞机内滚动视图并选择连接- >拖动滚动视图。
请注意,如果你有很多对撞机内滚动视图,您将需要拖动滚动视图脚本附加到所有的人。在这个例子中所有图像对撞机“同时”,所以滚动视图的背景精灵。
你可以提高你的进一步通过指定滚动条滚动视图。试一试!
To make it possible to navigate the scroll view using mouse or touch events you will need one or more colliders with UIDragScrollView script attached. NGUI makes it easy for you. Right-click
on any object with a collider inside the scroll view and choose Attach ->Drag Scroll View.
Note that if you have many colliders inside your scroll view, you will need to attach the Drag Scroll View script to all of them. In this example all "NGUI" images
have colliders, and so does the Scroll View Background sprite.
You can improve your scroll view further by specifying a Scroll Bar. Give it a try!
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
同时滚动视图是极其简单的。选择一个小部件,单击右键- >创建- >滚动视图。
可以导航滚动视图使用鼠标或触摸事件,你需要一个或多个对撞机附带UIDragScrollView脚本。同时方便给你。右键单击任何对象的对撞机内滚动视图并选择连接- >拖动滚动视图。
请注意,如果你有很多对撞机内滚动视图,您将需要拖动滚动视图脚本附加到所有的人。在这个例子中所有图像对撞机“同时”,所以滚动视图的背景精灵。
你可以提高你的进一步通过指定滚动条滚动视图。试一试!
相关文章推荐
- unity NGUI tutorial layout system
- Unity3D中的预制件(Prefab)的创建和使用说明!!!
- Unity中的自定义鼠标
- unity NGUI tutorial more events
- Unity android客户端实现双击跳过动画播放
- Unity中运用UDP广播服务器IP实现局域网联机
- unity NGUI Tutorial event system
- unity NGUI Tutorial context menus
- unity NUGUI tutorial the basics
- unity3D学习
- unity3d 随机物体生成器 工具
- 关于A*算法的研究
- unity与Android的交互
- 【Unity开发】简单的对象池实现
- Unity3d+ShareSDK+IOS9.1 编译错误(备忘)
- Unity局部高效实时阴影的思考和实现
- Unity中的输入
- UNITY 2D入门基础教程
- Unity光照贴图
- Unity3D UGUI中Rect Transform的特性