/******************************************************************** 文件: ScrollViewVerticalEx.cs 作者: 梦语 邮箱: 1982614048@qq.com 创建时间: 2024/04/23 09:17:10 最后修改: 梦语 最后修改时间: 2024/04/23 09:23:28 功能: *********************************************************************/ using Sirenix.OdinInspector; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Ether { public class ScrollViewVerticalEx : SerializedMonoBehaviour { /// /// 格子数据 /// public class CellInfo { public int index; public Vector3 pos; //已左上角为点 public GameObject item; } #region 参数 private ScrollRect scrollRect; public ScrollRect ScrollRect => scrollRect; [ShowInInspector] private RectTransform content; [ShowIf("cellPrefabPath", ""), Tooltip("该属性优先"), LabelText("格子预制体")] public GameObject cellPrefab; [ShowIf("cellPrefab", null), Tooltip("格子预制体属性优先"), LabelText("格子预制体路径")] public string cellPrefabPath; [ShowInInspector, LabelText("间隔")] private Vector2 specing; #endregion } }