mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-16 00:07:52 +08:00
attempt at auto-increasing pool size, not quite working properly
This commit is contained in:
@ -42,7 +42,7 @@ namespace UnityExplorer.UI.Widgets
|
||||
uiRoot.SetActive(true);
|
||||
}
|
||||
|
||||
public static GameObject CreatePrototypeCell(GameObject parent)
|
||||
public static RectTransform CreatePrototypeCell(GameObject parent)
|
||||
{
|
||||
var prototype = UIFactory.CreateHorizontalGroup(parent, "PrototypeCell", true, true, true, true, 2, default,
|
||||
new Color(0.15f, 0.15f, 0.15f), TextAnchor.MiddleCenter);
|
||||
@ -68,7 +68,7 @@ namespace UnityExplorer.UI.Widgets
|
||||
|
||||
prototype.SetActive(false);
|
||||
|
||||
return prototype;
|
||||
return rect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,9 +49,11 @@ namespace UnityExplorer.UI.Widgets
|
||||
{
|
||||
yield return null;
|
||||
|
||||
var proto = ButtonCell<T>.CreatePrototypeCell(Scroller.UIRoot);
|
||||
|
||||
RefreshData();
|
||||
Scroller.DataSource = this;
|
||||
Scroller.Initialize(this);
|
||||
Scroller.Initialize(this, proto);
|
||||
}
|
||||
|
||||
public void RefreshData()
|
||||
|
Reference in New Issue
Block a user