From c41b4af0e397a0aa0c7de4a36411e1ce449b4cc5 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Sun, 22 Jan 2023 10:40:29 +0000 Subject: [PATCH] Revised the Curly UI fix as it was preventing the graphic from being updated in the scene view. Thanks to @solidsign for the update. --- Runtime/Scripts/Effects/CurlyUI/CUIGraphic.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Runtime/Scripts/Effects/CurlyUI/CUIGraphic.cs b/Runtime/Scripts/Effects/CurlyUI/CUIGraphic.cs index 60cd5f4..3a555bf 100644 --- a/Runtime/Scripts/Effects/CurlyUI/CUIGraphic.cs +++ b/Runtime/Scripts/Effects/CurlyUI/CUIGraphic.cs @@ -285,15 +285,10 @@ namespace UnityEngine.UI.Extensions } } - public void Refresh() - { - StartCoroutine(RefreshOnNextFrame()); - } + public void Refresh() { Invoke(nameof(Refreshx), 0.3f); } - public IEnumerator RefreshOnNextFrame() + private void Refreshx() { - yield return new WaitForEndOfFrame(); - ReportSet(); // we use local position as the true value. Ratio position follows it, so it should be updated when refresh