1.在Hierarchy视图右键创建UI->Scroll View。 Scrollbar可根据自己需求选择是否删除,我这里制作的翻页日历用不上我就删除了。 connect节点挂上Grid Layout Group组件,参数属性可参考unity API。 下面是具体实现代码 using UnityEngine; using System.Collections; using UnityEngine.UI; using System.Collections.Generic; using UnityEngine.EventSystems; using System; public class PageView : MonoBehaviour, IBeginDragHandler, IEndDragHandler { private ScrollRect rect; //滑动组件 private float targethorizontal = 0; //滑动的起始坐标 private bool isDrag = false; //是否拖拽结束 private List<float>...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with I
Contact I, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack