Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 6033200

Browse files
committed
Don't use WaitForEndOfFrame in SrollPool init coroutine
1 parent 94ec1c4 commit 6033200

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/UI/Widgets/ScrollPool/ScrollPool.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,11 @@ public void Initialize(ICellPoolDataSource<T> dataSource, Action onHeightChanged
193193
RuntimeProvider.Instance.StartCoroutine(InitCoroutine(onHeightChangedListener));
194194
}
195195

196-
private WaitForEndOfFrame waitForEndOfFrame = new WaitForEndOfFrame();
197-
198196
private IEnumerator InitCoroutine(Action onHeightChangedListener)
199197
{
200198
ScrollRect.content.anchoredPosition = Vector2.zero;
201-
yield return waitForEndOfFrame ?? (waitForEndOfFrame = new WaitForEndOfFrame());
199+
yield return null;
200+
yield return null;
202201

203202
LayoutRebuilder.ForceRebuildLayoutImmediate(Content);
204203

0 commit comments

Comments
 (0)