diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIListBox.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIListBox.cs index 5d9f6b9387..f17662e05c 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIListBox.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIListBox.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using UnityEngine; +using UnityEngine.UI; using UnityEngine.UIElements; namespace BrewMonster.UI @@ -43,6 +44,7 @@ namespace BrewMonster.UI Vector2 size = content.sizeDelta; size.y = heightItem * m_Item.Count + m_Item.Count * paddingY; content.sizeDelta = size; + LayoutRebuilder.ForceRebuildLayoutImmediate(content); } public int SetItemData(int nIndex, uint dwItemData, int nSubIndex = 0, string strName = "") diff --git a/Assets/Prefabs/UI/DialogNPC.prefab b/Assets/Prefabs/UI/DialogNPC.prefab index 17556eb453..788a869867 100644 --- a/Assets/Prefabs/UI/DialogNPC.prefab +++ b/Assets/Prefabs/UI/DialogNPC.prefab @@ -873,7 +873,7 @@ MonoBehaviour: m_EditorClassIdentifier: content: {fileID: 3993049682140785046} prefabItemUIListBox: {fileID: 6927273031412389844} - heightItem: 50 + heightItem: 30 paddingY: 9 --- !u!1 &5271452121222737074 GameObject: