Search Unity

VERY irritating UI bug. Has anyone else experienced this?

Discussion in 'UGUI & TextMesh Pro' started by NPMGames, Dec 30, 2017.

  1. AdamWaters

    AdamWaters

    Joined:
    Aug 30, 2011
    Posts:
    94
    Can anyone confirm if this bug is fixed for the 2018 beta?
     
  2. Guirao

    Guirao

    Joined:
    Nov 24, 2012
    Posts:
    68
    They should release a patch asap, I don't know what are hey waiting for!
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
  4. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Is this the same issue where TMP stuff ends up putting the rect transform at left -100 top -100 ?
     
  5. enchiridion

    enchiridion

    Joined:
    Oct 29, 2014
    Posts:
    57
    I discovered this only happens if the prefab is parented in a Canvas. If you simply drag it into the scene it works as intended. However, this is undesired behavior and must still be fixed ASAP.

    2017.3.0p3
     
  6. Guirao

    Guirao

    Joined:
    Nov 24, 2012
    Posts:
    68
    2017.3.0p4 is out, I don''t see it fix in the version log...
     
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    Last edited: Jan 29, 2018
  8. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    @karl_jones Does Unity hold RCAs for stuff like this? A RectTransform defect in a production release seems like a good candidate.
     
    dadude123 likes this.
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    We have done RCAs in the past.Nothing planned at the moment but i'll make a note for when we pick it back up.
     
    dadude123 and Glaswyll like this.
  10. enchiridion

    enchiridion

    Joined:
    Oct 29, 2014
    Posts:
    57
  11. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    I found a horrible workaround (well, it worked for me anyway :p, in one simple project :(): Activate all the gameobjects in your prefab then hit apply, then do any gameobject deactivating you need to do (don't apply that). It's an awful, AWFUL workaround, and I could only apply it to one project with very simple UI.
     
  12. larry_kirschner_ict

    larry_kirschner_ict

    Joined:
    Jan 4, 2018
    Posts:
    4
    This is the best workaround I was able to come up with. Basically, add an instance of this component to any of the objects in your prefab that are getting messed up:

    Code (CSharp):
    1.  
    2. using UnityEngine.EventSystems;
    3. using UnityEngine;
    4. [ExecuteInEditMode]
    5. public class UnityGetYourActTogetherOrGiveMyMoneyBack : MonoBehaviour
    6. {
    7.     public Vector3 m_anchoredPosition;
    8.     void Start()
    9.     {
    10.         GetComponent<RectTransform> ().anchoredPosition = m_anchoredPosition;
    11.     }
    12.     #if UNITY_EDITOR
    13.     void Update()
    14.     {
    15.         if (Application.isPlaying) {
    16.             return;
    17.         }
    18.         m_anchoredPosition = GetComponent<RectTransform> ().anchoredPosition3D;
    19.     }
    20.     #endif
    21. }

    For me the layout problems happen both at edit time (when I apply a prefab) *and* at run time (when I instantiate a prefab, even if it's correct in asset form).

    The one saving grace *seems* to be that the set of objects in a prefab that get affected is roughly consistent and it's not all of them. So I'm just adding the above component to the affected objects under each prefab.
     
  13. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    Still no update for 2017.3.1

    Edit: They're saying next week for the 2017.3.1 patch release.
     
    Last edited: Feb 2, 2018
  14. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Sigh. OMG This is a nightmare of a problem for me. So I wasted 8 hours with this problem before I came here to this forum post. Dear god. I'm gonna scream if its not fixed this coming week.

    And I'll probably cry a little as well.
     
    Last edited: Feb 3, 2018
    Player7 likes this.
  15. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    @karl_jones Do you think p1 will be available today?
     
  16. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    Hey. Sorry I have been out of the loop this week. I'm in a different time zone to the team. Ill message them now but probably won't be able to reply till Monday as I will be flying for the weekend without internet.
     
  17. crdgre

    crdgre

    Joined:
    Jul 14, 2015
    Posts:
    6
    Same here. 2017.3.0f3. Almost all UI elements are messed up after applying changes in prefab. Randomly moved. Scrollbar controls resized or totally disappeared... I saw this too late. The last backup was day ago.
     
    PGI2017 likes this.
  18. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    I'm told that they had to do a rebuild (last minute fixes). It should be ready for Monday
     
  19. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    • (991023) - UGUI: Fixed undoing the activation of a UI layout component not undoing the side effects to the children RectTransforms.
    • (991019) - UGUI: Fixed a driven RectTransform causing a scene to be constantly flagged as dirty.

    looks like Patch 2017.2.1p4 is out now. Looks like one of these that is mention will be a fix for 2017.3.0 when it comes out. So glad.
     
  20. enchiridion

    enchiridion

    Joined:
    Oct 29, 2014
    Posts:
    57
    Patch 2017.2.1p4
    Released: 12 February 2018

    So it's fixed in 2017.2 but not in 2017.3? This is getting ridiculous!
     
  21. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Dang what time did the 2017.2.1p4 come out yesterday. its 10:15am CST right now.
    I backed up my project last night which takes a hour to cause its so huge. Was hoping 2017.3.0 would get patched early today so I can upgrade to it.
     
  22. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    We definitely need better transparency and communication. There should be a process in place to notify end users of delays. We all work in software, so we get that delays happen, but give us a status update, even if it's small.
     
    Menion-Leah likes this.
  23. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    I'm just amazed at how long a bug like this goes unfixed. Even with repro steps and (I assume) a ton of bug reports submitted. I realize a lot's happening right now, but from the outside, everything feels like its moving through molasses. There's gotta be a better way to get critical bug fixes out faster.
     
  24. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Ya this bug messed me up so badly. Gonna take hours fixing all my game UI after its fixed. I had to completely stop working on UI stuff and work on something else. I feel bad for the people who had this bug since late December? Still had to wait 2 weeks. I couldn't go back a update cause I didn't notice the bug till after I did two weeks of work.
    I find it odd though why there isn't more people posting on this thread. Unless there are several other threads open about this topic.
    Its such a major bug.
     
    larry_kirschner_ict likes this.
  25. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    I'm thinking your last guess is correct. There are a couple threads about it depending on how it's surfacing for people. Some folks believed it was a problem with TextMeshPro.

    https://forum.unity.com/threads/app...ment-breaks-layout.508589/page-2#post-3368021
    https://forum.unity.com/threads/whe...onents-snap-to-center-pivot-of-parent.516788/

    If there were clearer avenues of communication about these issues, it might help alleviate some of the mess. We were told it should be ready for Monday, which came and went, so far with no new information.

    Either there was a process breakdown, or no formal process exists at Unity for communicating updates and delays to their users.

    It was great that Karl gave us what information he did, but that responsibility shouldn't be shouldered by one developer happening upon a forum thread.

    It'd be helpful if there were some kind of status page that organized this information on a per Unity version, per issue ID basis, that was regularly updated as part of the sprint. I know there's the Issue Tracker (https://issuetracker.unity3d.com/is...-apply-on-prefab-even-if-no-changes-were-made) but the only status it shows is "Fixed in future release" which isn't super helpful.
     
    Last edited: Feb 13, 2018
    ekaralar and Menion-Leah like this.
  26. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    It's also interesting the two gui fixes in the 2017.2 patch had no link for the issue number next to it.
     
  27. mihakinova

    mihakinova

    Joined:
    Jan 6, 2015
    Posts:
    85
    Just a note here, this has been fixed in 2018.1b5.

    HOWEVER. Now it happens (at least for me) without any prefabs at all! Just opening my scene (that has no prefabs - because of this bug) messes up the UI elements. Maybe it has something to do with the objects being set to inactive.
    Unity is aware of this and are (hopefully) working on a fix.
     
  28. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    b7 out this week right.. with the fix? This whole we only do one beta release a week is seriously killing productivity for those silly enough to use these beta releases.. like me damnit
     
  29. Supergeek

    Supergeek

    Joined:
    Aug 13, 2010
    Posts:
    103
    Upgraded to 3.1f1 to see if the collider update bug had been fixed, and now my text elements are all messed up. Cool.
     
  30. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    lol omg I don't even know if i should upgrade to 2017.3.1 due to @Supergeek comment. Is this gonna make the issue even worse.
    Think i'll let someone else upgrade to it and post here first with results.
    The issue I have is saving a prefab that has UI contained in it will mess up child transforms.
     
  31. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    2017.3.1p1 is up on the patch releases.
     
  32. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    can you try it out boyerworks and post back here? Or is that not the version you are wanting?
     
  33. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    It is, and I am. I'll report back on the UI issue as soon as it's installed.
     
  34. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Thanks I appreciate it. It will save me a lot of wasted time lol.
    Looks like there are more UI fixes on this version than yesterdays version on 2017.2
     
  35. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    So far the issue appears to be resolved. I was able to put a UI panel where I wanted, disable the Prefab and apply changes. The changes were still there when reactivating the Prefab.

    Just an early report, but I'm cautiously hopeful.
     
  36. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Try saving prefab and then deactivate prefab and hitting play and do that twice in a row. see what happens.
    Or is that what you did?
    I notice i had to do it a couple times before it messed up.
     
  37. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    Tried your steps and the RectTransform position data is still where I left it.
     
  38. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    This defect was affecting me consistently. I could reproduce it every time before this patch.
    • Change UI component position inside prefab
    • Uncheck Prefab GameObject
    • Apply changes
    • Check Prefab GameObject
    • UI position reverted
    Now it isn't doing that.
     
    Supergeek likes this.
  39. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Thanks for testing and reporting back. I'm gonna update then lol.
     
    Glaswyll likes this.
  40. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    This is by no means fixed in 2017.3.1f1.
    It appears however that it only messes up inactive game objects inside the prefab.
    Regardless this issue makes UI work impossible. Impressive work Unity UI Team.

    Update: It appears the actual problem isn't with the prefab itself, but with the scene.
    1. Make change to prefab
    2. Apply
    3. All layout is screwed

    if however the scene is reloaded, discarding all changes (of which there are none) after step 2, then it seems to 'work'.
    This clearly is not a viable work-around though.
     
    Last edited: Feb 15, 2018
  41. mihakinova

    mihakinova

    Joined:
    Jan 6, 2015
    Posts:
    85
    @Geminior The last few posts are about 2017.3.1p1 (patch release)

    That being said, I can confirmed the issue is fixed for me in the said patch release. Finally! UI prefabs work as expected, and positions aren't messed up anymore.
     
  42. carsanlop

    carsanlop

    Joined:
    Dec 12, 2017
    Posts:
    11
    This must be the fix:
    • (977959) - UI: Fixed issue with UI and prefab positioning.

    I have spent several hours today working on the UI and, so far, everything appears to work as expected. Thanks to the Unity team and Karl Jones for fixing this.
     
    CoughE and mihakinova like this.
  43. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    Thank you @karl_jones for letting us know the status, but this really shouldn't be on your shoulders. Is it possible to suggest a process addition to Unity's defect resolution team where they provide more up to date information regarding the status of a patch release as a part of their regular sprints, if they do sprints?
     
  44. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    It is partly my responsibility as I'm part of the Sustained Engineering Team who is responsible for patch releases. Its a good idea to have some sort of patch status though. I'll bring it up in the future.

    Thanks
     
    Last edited: Feb 16, 2018
    Glaswyll likes this.
  45. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    This is what the bug did to all the windows in my game.
    Normally i would just use my back up. But I didn't notice the bug till two weeks later.
    It was a complete nightmare. Super glad its fixed though.

     
  46. mihakinova

    mihakinova

    Joined:
    Jan 6, 2015
    Posts:
    85
    Just a note for anyone interested, the issue is still present in 2018.1.0b8.

    Can we expect this fix to make it to the 2018.1 official release? Or the next beta?
     
    firejerm likes this.
  47. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    The fix is in b8. Are you sure it's the same problem? Are you setting the local position via script? You may need to call ForceUpdateRectTransforms() after setting local position, this is from changes in 2018.1.
     
  48. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    If anyone is curious for a long term workaround, things like this are where ScriptableObjects would shine.
     
  49. Vekta

    Vekta

    Joined:
    Jun 22, 2014
    Posts:
    9
    @karl_jones still getting this issue in 2017.3.1f1
    Been dancing with this bug since early December.

    This bug can easily creep into developers releases for their games/apps, so you should get a fix for this out of patches and into a proper version release asap.

    Really need to squash this as myself and many others have lost days to redoing UI because of this bug.
     
  50. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    You need the latest patch version.