Search Issue Tracker

Won't Fix

Votes

0

Found in

2019.1.5f1

2019.2.0b4

2019.3.0a4

Issue ID

1160044

Regression

Yes

[Regression] Icons placed using rich text tags by text generation are offset in a random position

uGUI

-

How to reproduce:
1. Open the user-submitted project ("UI Text Bug.7z") and open the "Test Scene" scene
2. In the Hierarchy expand the "Canvas" object and click on the "Text" object
3. In Its inspector under the "Text Pic" script's text field, delete the pre-existing text and type "circle circle"
4. Observe the text field in the Game Window

Expected result: the text and the rich text's image are aligned in the same line without any issues
Actual result: the rich text's image is misaligned with the text and gets placed in offset positions

Reproduced in: 2019.3.0a5, 2019.3.0a4, 2019.2.0b4, 2019.1.5f1
Not reproducible in: 2019.3.0a3, 2019.3.0a1, 2019.2.0b3, 2019.2.0a1, 2019.1.4f1, 2019.1.0a1, 2018.4.2f1
Couldn't test with: 2017.4.28f1 (plugin breaks in this version)

  1. Resolution Note (2019.3.X):

    The TextPic script needs to be updated. Issue is now that white space and unrendered characters are no longer generating verts. Before the string "This is a test to see if circle will update properly." would have 7 space characters that would have verts generated before the "circle" text which gets replaced by the quad text. This is unnecessary overhead to render nothing. The same was happening for the rich text tags. Every character in "<quad name=circle size=12 width=12/>" would generate a vert. Thus for that tag which would just be replaced with 4 verts it would generate 144 empty verts.

    In the example project if i manually remove the 7 white space characters from "var picIndex" the circle renders fine.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.