Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

VERY irritating UI bug. Has anyone else experienced this?

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

  1. toshbaird

    toshbaird

    Joined:
    Jan 12, 2017
    Posts:
    3
    Also looking for an update. We need this fixed bug to be in a patch ASAP. At least give us an ETA!
     
  2. snlehton

    snlehton

    Joined:
    Jun 11, 2010
    Posts:
    95
    Just ran into this in Unity 2017.3.0p3.

    The repro is simple:
    • Create an empty UI prefab
    • Add TMP Dropdown in it
    • Apply prefab
    • The dropdown items and the scrollbar are now broken in the prefab
     
  3. AdamWaters

    AdamWaters

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

    Guirao

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

    katumplet

    Joined:
    Jun 27, 2017
    Posts:
    79
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
  7. Player7

    Player7

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

    enchiridion

    Joined:
    Oct 29, 2014
    Posts:
    54
    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
     
  9. Guirao

    Guirao

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

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    Last edited: Jan 29, 2018
  11. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    53
    @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.
  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    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.
  13. enchiridion

    enchiridion

    Joined:
    Oct 29, 2014
    Posts:
    54
  14. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    227
    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.
     
  15. larry_kirschner_ict

    larry_kirschner_ict

    Joined:
    Jan 4, 2018
    Posts:
    3
    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.
     
  16. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    53
    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
  17. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    694
    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.
  18. Glaswyll

    Glaswyll

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

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    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.
     
  20. crdgre

    crdgre

    Joined:
    Jul 14, 2015
    Posts:
    3
    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.
  21. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,855
    I'm told that they had to do a rebuild (last minute fixes). It should be ready for Monday
     
  22. katumplet

    katumplet

    Joined:
    Jun 27, 2017
    Posts:
    79
    Looking forward to it, thank you for keeping us informed
     
  23. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    694
    • (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.
     
  24. katumplet

    katumplet

    Joined:
    Jun 27, 2017
    Posts:
    79
    Failing on "Verify the downloaded data" ...
     
  25. katumplet

    katumplet

    Joined:
    Jun 27, 2017
    Posts:
    79
    Will 2018 be getting the patch too?
     
  26. enchiridion

    enchiridion

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

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

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    694
    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.
     
  28. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    53
    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.
  29. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    585
    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.
     
  30. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    694
    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.
  31. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    53
    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.
  32. Shadowing

    Shadowing

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

    mihakinova

    Joined:
    Jan 6, 2015
    Posts:
    83
    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.
     
  34. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    959
    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
     
  35. Supergeek

    Supergeek

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

    katumplet

    Joined:
    Jun 27, 2017
    Posts:
    79
    Wasn't fixed for me on 2018.1.0b6, where is this particular version?
     
  37. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    694
    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.
     
  38. Glaswyll

    Glaswyll

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

    Shadowing

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

    Glaswyll

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

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    694
    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
     
  42. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    53
    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.
     
  43. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    694
    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.
     
  44. Glaswyll

    Glaswyll

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

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    53
    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.
  46. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    694
    Thanks for testing and reporting back. I'm gonna update then lol.
     
    Glaswyll likes this.
  47. katumplet

    katumplet

    Joined:
    Jun 27, 2017
    Posts:
    79
  48. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    309
    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
  49. mihakinova

    mihakinova

    Joined:
    Jan 6, 2015
    Posts:
    83
    @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.
     
  50. carsanlop

    carsanlop

    Joined:
    Dec 12, 2017
    Posts:
    8
    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.
     
    Skylar1146 and mihakinova like this.