diff --git a/src/UI/CacheObject/CacheMember.cs b/src/UI/CacheObject/CacheMember.cs
index 5fb203d..605b86e 100644
--- a/src/UI/CacheObject/CacheMember.cs
+++ b/src/UI/CacheObject/CacheMember.cs
@@ -77,9 +77,6 @@ namespace UnityExplorer.UI.CacheObject
public override void TrySetUserValue(object value)
{
- if (State == ValueState.String)
- ReflectionProvider.Instance.BoxStringToType(ref value, FallbackType);
-
TrySetValue(value);
Evaluate();
diff --git a/src/UI/CacheObject/CacheObjectBase.cs b/src/UI/CacheObject/CacheObjectBase.cs
index 23aa9c1..3fb9c1f 100644
--- a/src/UI/CacheObject/CacheObjectBase.cs
+++ b/src/UI/CacheObject/CacheObjectBase.cs
@@ -65,7 +65,6 @@ namespace UnityExplorer.UI.CacheObject
protected const string NOT_YET_EVAL = "Not yet evaluated";
-
public virtual void ReleasePooledObjects()
{
if (this.IValue != null)
@@ -97,7 +96,10 @@ namespace UnityExplorer.UI.CacheObject
public void SetUserValue(object value)
{
- value = value.TryCast(FallbackType);
+ if (State == ValueState.String)
+ ReflectionProvider.Instance.BoxStringToType(ref value, FallbackType);
+ else
+ value = value.TryCast(FallbackType);
TrySetUserValue(value);
}
diff --git a/src/UI/CacheObject/Views/CacheObjectCell.cs b/src/UI/CacheObject/Views/CacheObjectCell.cs
index a50f798..14ae4dc 100644
--- a/src/UI/CacheObject/Views/CacheObjectCell.cs
+++ b/src/UI/CacheObject/Views/CacheObjectCell.cs
@@ -97,9 +97,6 @@ namespace UnityExplorer.UI.CacheObject.Views
protected abstract void ConstructEvaluateHolder(GameObject parent);
- // protected abstract void ConstructUpdateToggle(GameObject parent);
-
- // Todo could create these as needed maybe, just need to make sure the transform order is correct.
public virtual GameObject CreateContent(GameObject parent)
{
@@ -111,11 +108,6 @@ namespace UnityExplorer.UI.CacheObject.Views
UIFactory.SetLayoutElement(UIRoot, minWidth: 100, flexibleWidth: 9999, minHeight: 30, flexibleHeight: 600);
UIRoot.AddComponent().verticalFit = ContentSizeFitter.FitMode.PreferredSize;
- //var content = UIFactory.CreateUIObject("Content", UIRoot);
- //UIFactory.SetLayoutGroup(content, true, false, true, true, 2, 0);
- //UIFactory.SetLayoutElement(content, minWidth: 100, flexibleWidth: 9999, minHeight: 30, flexibleHeight: 600);
- //content.AddComponent().verticalFit = ContentSizeFitter.FitMode.PreferredSize;
-
var horiRow = UIFactory.CreateUIObject("HoriGroup", UIRoot);
UIFactory.SetLayoutElement(horiRow, minHeight: 29, flexibleHeight: 150, flexibleWidth: 9999);
UIFactory.SetLayoutGroup(horiRow, false, false, true, true, 5, 2, childAlignment: TextAnchor.UpperLeft);
diff --git a/src/UI/IValues/InteractiveDictionary.cs b/src/UI/IValues/InteractiveDictionary.cs
index eccebbf..db85733 100644
--- a/src/UI/IValues/InteractiveDictionary.cs
+++ b/src/UI/IValues/InteractiveDictionary.cs
@@ -57,7 +57,10 @@ namespace UnityExplorer.UI.IValues
values.Clear();
foreach (var entry in cachedEntries)
+ {
+ entry.UnlinkFromView();
entry.ReleasePooledObjects();
+ }
cachedEntries.Clear();
}
@@ -166,10 +169,15 @@ namespace UnityExplorer.UI.IValues
var entry = cachedEntries[index];
- if (cell.Occupant != null && entry != cell.Occupant)
+ if (entry.CellView != null && entry.CellView != cell)
+ entry.UnlinkFromView();
+
+ if (cell.Occupant != null && cell.Occupant != entry)
cell.Occupant.UnlinkFromView();
- entry.SetView(cell);
+ if (entry.CellView != cell)
+ entry.SetView(cell);
+
entry.SetDataToCell(cell);
SetCellLayout(cell);
diff --git a/src/UI/IValues/InteractiveList.cs b/src/UI/IValues/InteractiveList.cs
index a236d2e..6e34a93 100644
--- a/src/UI/IValues/InteractiveList.cs
+++ b/src/UI/IValues/InteractiveList.cs
@@ -163,10 +163,15 @@ namespace UnityExplorer.UI.IValues
var entry = cachedEntries[index];
- if (cell.Occupant != null && entry != cell.Occupant)
+ if (entry.CellView != null && entry.CellView != cell)
+ entry.UnlinkFromView();
+
+ if (cell.Occupant != null && cell.Occupant != entry)
cell.Occupant.UnlinkFromView();
- entry.SetView(cell);
+ if (entry.CellView != cell)
+ entry.SetView(cell);
+
entry.SetDataToCell(cell);
}
diff --git a/src/UI/Inspectors/ListInspector.cs b/src/UI/Inspectors/ListInspector.cs
deleted file mode 100644
index daa268c..0000000
--- a/src/UI/Inspectors/ListInspector.cs
+++ /dev/null
@@ -1,197 +0,0 @@
-//using System;
-//using System.Collections;
-//using System.Collections.Generic;
-//using System.Linq;
-//using System.Text;
-//using UnityEngine;
-//using UnityEngine.UI;
-//using UnityExplorer.UI.CacheObject;
-//using UnityExplorer.UI.CacheObject.Views;
-//using UnityExplorer.UI.Utility;
-//using UnityExplorer.UI.Widgets;
-
-//namespace UnityExplorer.UI.Inspectors
-//{
-// // TODO
-// // - set fallback type from generic arguments
-// // - handle setting through IList
-// // - handle il2cpp lists
-
-// public class ListInspector : InspectorBase, IPoolDataSource, ICacheObjectController
-// {
-// // TODO
-// public CacheObjectBase ParentCacheObject { get; set; }
-
-// public Type TargetType { get; private set; }
-
-// public bool CanWrite => RefIList != null && !RefIList.IsReadOnly;
-
-// public Type EntryType;
-// public IEnumerable RefIEnumerable;
-// public IList RefIList;
-
-// public int ItemCount => values.Count;
-// private readonly List