Switched to Unity 6.5 from 6.3, I’m using UI Toolkit
Got logic hooked to Label.PostProcessTextVertices
Now I receive error:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
In here:
public class FadeInTypewriter :
ITextTypewriter
{
public void Apply(
TextElement.GlyphsEnumerable glyphs,
float progress)
{
var scaledProgress = progress * glyphs.Count;
var i = 0;
foreach (var glyph in glyphs)
{
var glyphProgress = Mathf.Clamp01(scaledProgress - i);
SetGlyphAlpha(glyph, (byte)(255 * glyphProgress));
i++;
}
}
}
Enumerating foreach (var glyph in glyphs) throws
TextElement, this line:
this.Current = new TextElement.Glyph(this.m_Vertices[glyphRenderInfo.meshIndex].Slice<Vertex>(glyphRenderInfo.textElementInfoIndex * 4, 4), glyphRenderInfo.lineIndex, linkID, (TextElement.GlyphKind) glyphRenderInfo.kind);
The text that I try to print:
<i>(booming, furious)</i><br><b>WHAT IS GOING ON IN HERE?!</b>
After this all texts are broken and invisible
Other places seems fine, but not this one
Is this Unity Bug?