From 98444eeabbc657576e3b891133f3325d0eebaf00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com> Date: Tue, 27 May 2025 15:40:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/RecyclerView/RecyclerView.cs | 29 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/Runtime/RecyclerView/RecyclerView.cs b/Runtime/RecyclerView/RecyclerView.cs index 09fcc09..89c9aa8 100644 --- a/Runtime/RecyclerView/RecyclerView.cs +++ b/Runtime/RecyclerView/RecyclerView.cs @@ -22,6 +22,21 @@ namespace AlicizaX.UI.RecyclerView set => alignment = value; } + [SerializeField] private RectTransform content; + + public RectTransform Content + { + get + { + if (content == null) + { + content = transform.GetChild(0).GetComponent(); + } + + return content; + } + } + [SerializeField] private Vector2 spacing; public Vector2 Spacing @@ -94,20 +109,6 @@ namespace AlicizaX.UI.RecyclerView public bool CanScroll => true; - private RectTransform content; - - public RectTransform Content - { - get - { - if (content == null) - { - content = transform.GetChild(0).GetComponent(); - } - - return content; - } - } public ViewProvider ViewProvider {