Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

[Solved, probably] Anchor or Alignment issue with <color>

A topic by holdingjason@gmail.com created Apr 23, 2018 Views: 91 Replies: 2
Viewing posts 1 to 3
(1 edit)

Getting two different results of positional layout of text for the following;

What a pretty <c=C47015FF> blue shell</c>

What a pretty blue shell

The 1st text is to low is not properly centered in the text box.


The 2nd one works fine.  Centers correctly within the text box. 

 Vertical limit set to 100, Auto Wrap to 245, anchor Middle Center and Alignment Center.  Best fit off.

Thanks

Developer

Hey! Was able to repro by just adding a </c> tag to the end, and it looks like that's the cause? I'm finding weird alignment issues when using any closing tag at the very end and an even weirder one when using quads at the very end... Looking into how to fix this, now.


For now, you don't actually have to close off tags at the end of a mesh, so you can leave the </c> out and it should work fine?

Developer

Figured it out, I think!

On line 2701 of SuperTextMesh.cs, change "latestNumber = info.Count-1;" to "latestNumber = hyphenedText.Length-1;"

Please let me know if this works for you!