UGUI ScrollRect 带按钮翻页支持拖拽
<strong><span style="font-family:Microsoft YaHei;font-size:14px;">using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections.Generic;
using System;
/// <summary>
/// 略知CSharp http://blog.youkuaiyun.com/subsystemp
/// </summary>
public class ScrollRectHelper : MonoBehaviour, IBeginDragHandler, IEndDragHandler
{
public float smooting = 5; //滑动速度
public List<GameObject> listItem; //scrollview item
public int pageCount = 3; //每页显示的项目
ScrollRect sre
UGUI ScrollRect 拖拽翻页功能实现

该博客介绍了如何在Unity3D中使用UGUI ScrollRect组件,结合C#编程实现带按钮的翻页功能,同时支持用户通过拖拽进行页面浏览。提供了一个DEMO下载链接供读者实践。
最低0.47元/天 解锁文章
1712

被折叠的 条评论
为什么被折叠?



