Skip to content

Commit

Permalink
[Fix] Prevent several Updates on text object startup
Browse files Browse the repository at this point in the history
  • Loading branch information
RhenaudTheLukark committed Apr 8, 2024
1 parent d1d6ad9 commit 5eb1ba6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Assets/Scripts/Text/TextManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 5eb1ba6

Please sign in to comment.