mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-01-08 10:13:25 +08:00
Don't use WaitForEndOfFrame in SrollPool init coroutine
This commit is contained in:
parent
94ec1c4908
commit
6033200579
@ -193,12 +193,11 @@ namespace UnityExplorer.UI.Widgets
|
||||
RuntimeProvider.Instance.StartCoroutine(InitCoroutine(onHeightChangedListener));
|
||||
}
|
||||
|
||||
private WaitForEndOfFrame waitForEndOfFrame = new WaitForEndOfFrame();
|
||||
|
||||
private IEnumerator InitCoroutine(Action onHeightChangedListener)
|
||||
{
|
||||
ScrollRect.content.anchoredPosition = Vector2.zero;
|
||||
yield return waitForEndOfFrame ?? (waitForEndOfFrame = new WaitForEndOfFrame());
|
||||
yield return null;
|
||||
yield return null;
|
||||
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(Content);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user