IndieGame/client/Assets/Ether/Scripts/Module/Extension/UGUI/ScrollView/ScrollViewVerticalEx.cs

51 lines
1.3 KiB
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
/********************************************************************
: 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
{
/// <summary>
/// 格子数据
/// </summary>
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
}
}