mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-02 19:42:38 +08:00
InteractiveBool, Il2Cpp>Mono type dict cache, some UI fixes
This commit is contained in:
@ -25,6 +25,7 @@ namespace UnityExplorer.Inspectors.Reflection
|
||||
public override IValueTypes IValueType => IValueTypes.Enumerable;
|
||||
|
||||
public override bool HasSubContent => true;
|
||||
public override bool SubContentWanted => (RefIList?.Count ?? 1) > 0;
|
||||
public override bool WantInspectBtn => false;
|
||||
|
||||
internal IEnumerable RefIEnumerable;
|
||||
@ -137,7 +138,7 @@ namespace UnityExplorer.Inspectors.Reflection
|
||||
entry.Enable();
|
||||
}
|
||||
|
||||
UpdateSubcontentHeight();
|
||||
//UpdateSubcontentHeight();
|
||||
}
|
||||
|
||||
internal override void OnToggleSubcontent(bool active)
|
||||
@ -154,36 +155,6 @@ namespace UnityExplorer.Inspectors.Reflection
|
||||
RefreshDisplay();
|
||||
}
|
||||
|
||||
public void UpdateSubcontentHeight()
|
||||
{
|
||||
Canvas.ForceUpdateCanvases();
|
||||
|
||||
float totalHeight = 0f;
|
||||
if (m_subContentParent.activeSelf)
|
||||
{
|
||||
foreach (var itemIndex in m_pageHandler)
|
||||
{
|
||||
if (itemIndex >= m_entries.Count)
|
||||
break;
|
||||
|
||||
var entry = m_entries[itemIndex];
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(entry.m_mainRect);
|
||||
totalHeight += entry.m_mainRect.rect.height;
|
||||
}
|
||||
}
|
||||
|
||||
m_listLayout.minHeight = Mathf.Min(350f, totalHeight);
|
||||
//m_mainLayout.minHeight = totalHeight;
|
||||
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(OwnerCacheObject.m_mainRect);
|
||||
|
||||
if (OwnerCacheObject is INestedValue nestedValue)
|
||||
{
|
||||
// nested enumerable
|
||||
nestedValue.UpdateSubcontentHeight();
|
||||
}
|
||||
}
|
||||
|
||||
#region UI CONSTRUCTION
|
||||
|
||||
internal GameObject m_listContent;
|
||||
|
Reference in New Issue
Block a user