Search Unity

TextMesh Pro TextContainer upgrade issue.

Discussion in 'UGUI & TextMesh Pro' started by Antony-Blackett, Jan 29, 2018.

  1. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    Hi, I've come across what I believe is a bug. It's related to updating TextMesh Pro from Unity 5.6 -> Unity 2017. I upgraded TextMesh Pro and everything seemed ok. But I'm not sure why it happened or if it was something I just didn't notice immediately. I found that objects that have TextMesh Pro components and used the old TextContainer did not upgrade properly if those gameObjects were disabled inside a prefab. I often have states in menus and popups that I toggle on and off with gameObject active.

    The resulting bug is that alignments and positioning of those objects was all wrong (I assume some default state) instead of what they previously were.
     
    Last edited: Jan 30, 2018
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Could you submit a bug report with a Repro Project that would enable me to easily reproduce this?

    While at it, I could also test the upgrade process to Unity 2018.1.
     
  3. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    I'm not sure it's easy to reproduce... When I get some spare time I'll see if I can make a small test case for it.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    I'll see if I can reproduce on my end. This does give me some insight.

    P.S. I moved these posts into a new thread to make it easier to track.
     
    Antony-Blackett likes this.
  5. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    Here's some more info... I was editing a prefab to try and get it back to how it should be, I made a mistake editing and hit undo and a couple text mesh pro components suddenly forgot their settings, components that were fine and I had not touched during the current edit of the prefab... I have no idea what's going on.
     
  6. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    And you can see here that I get text displayed in ways that makes no sense compared with the component settings... :/

    Screen Shot 2018-01-30 at 2.10.05 PM.png
     
  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    It looks like in the conversion of the enums which were used when the TextContainer was there and the new enum set for alignment which includes new options, it is getting confused. The text objects end up with some invalid enum value for Alignment.

    Some Repro project would be awesome as I can figure out which object / state of an object results in this when upgrading from an older version to newer.
     
  8. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    It's not just alignment though, the rect transform positions are also wrong, they seem to have been set back to 0,0,0 when they shouldn't be. I will try and get you a repro next week. I'm flat out this week sorry.

    Edit: on a further look they seem to set x and y to 0 and z remains ok.
     
  9. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    A repro would be most useful whenever you can.

    What version of Unity are you using?
     
  10. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    I went from Unity 5.6.2p4 and upgraded to 2017.3.0p3
     
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    There is also the issue with the RectTransform in Unity 2017.3 which could be compounding the issue(s).

    Make sure you keep a backup of the Unity 5.6 project so we can eventually sort this out.