Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

TextMesh Pro GetRenderedValues returns wrong value when using unicode character \u200B

Discussion in 'UGUI & TextMesh Pro' started by tomkail_betterup, Sep 2, 2022.

  1. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    76
    \u200B is a "no width space". There's one to the left of the \ character at the start of the post :D
    I've no idea how one snuck into my game, I discovered it when GetRenderedValues(true) was returning -4294967000.00.
    I can't see any reason for GetRenderedValues/GetPreferredValues to ever return values < 0; can I suggest clamping values to 0 to avoid this sort of weirdness from occurring?
    Thanks!

    Sorry, posted twice because I tagged it as a bug rather than TextMesh Pro and I'd like it to reach the right team. Can I also suggest having two forums so we can use tags properly?