From 5eb1ba629c677f6f923def26727f9bdeef94ac90 Mon Sep 17 00:00:00 2001 From: RhenaudTheLukark Date: Tue, 9 Apr 2024 01:50:33 +0200 Subject: [PATCH] [Fix] Prevent several Updates on text object startup --- Assets/Scripts/Text/TextManager.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Assets/Scripts/Text/TextManager.cs b/Assets/Scripts/Text/TextManager.cs index 089b478ed..69447c15f 100644 --- a/Assets/Scripts/Text/TextManager.cs +++ b/Assets/Scripts/Text/TextManager.cs @@ -284,7 +284,7 @@ public int LineCount() { } public bool LineComplete() { - return instantActive || currentCharacter == textQueue[currentLine].Text.Length; + return textQueue == null || instantActive || currentCharacter == textQueue[currentLine].Text.Length; } [MoonSharpHidden] public bool AllLinesComplete() { @@ -684,9 +684,6 @@ protected virtual void SpawnText() { // Work-around for [instant] and [instant:allowcommand] at the beginning of a line of text if (skipImmediate) InUpdateControlCommand(DynValue.NewString(skipCommand)); - - if (!instantActive) - Update(); } private float[] ComputeTextSpacings() {