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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Bug Canvas broken after loading project on 2022.3.3f1

Discussion in 'UGUI & TextMesh Pro' started by nolemretaW, Jun 25, 2023.

  1. nolemretaW

    nolemretaW

    Joined:
    May 22, 2020
    Posts:
    2
    When I try to edit UI right after loading my project, canvas size (which is set to scale with screen size by height to 1920x1080) is incorrect. But when I click on the "Game" tab, it fixes itself, and every other canvas in project, even outside of currently loaded scene. Tested with project upgraded from 2022.2.5f1 and on a new project created on 2022.3.3f1. I haven't noticed that behaviour on the older version.

    upload_2023-6-25_20-0-44.png
     
    Last edited: Jun 25, 2023
  2. Davidjsap

    Davidjsap

    Joined:
    Aug 17, 2017
    Posts:
    11
    I've also been having a number of new issues with the canvas in this Unity version that didn't exist prior. All of my POS Y values are resetting to zero on prefabs
     
  3. unity-pro-12

    unity-pro-12

    Joined:
    May 9, 2023
    Posts:
    1
    Got the same issue today after upgrading from a 2021 LTS. Very weird.
     
  4. Shefferle

    Shefferle

    Joined:
    Sep 10, 2018
    Posts:
    1
    We also upgraded to 2022.3.3f1 and now canvases act differently when starting up the same built exe multiple times. Sometimes the canvases are scaled half out of the screen, sometimes everything fits perfectly, and sometimes the canvases can not be seen at all and have to be way off-screen. All happening on the same built xD We have similar issues with a newly created project on 2022.3.3f1 and a single Canvas (Graphy) in the project. Its a mess...
     
    Notrain0, msfredb7 and crgKlaas like this.
  5. CRG-Hans

    CRG-Hans

    Joined:
    May 9, 2022
    Posts:
    11
  6. mcapdegelle

    mcapdegelle

    Joined:
    Nov 7, 2014
    Posts:
    28
    Banged my head trying to figure why it was not working, looks like it's a new problem...

    When testing this in a new project :
    - I set the Pos Y of an image to -90.
    - Close and re-open the project
    - The pos Y value displayed in the inspector is now 0, event if the value saved in the scene file is still -90...
     
  7. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,062
    Thank you very much for this.

    Will avoid updating until this is resolved. Heavy user of Canvases.
     
  8. c0nd3v

    c0nd3v

    Joined:
    May 8, 2019
    Posts:
    30
    I sent a report of this problem to Unity... hopefully they accept it and this gets fixed because this is causing my UI to get messed up
     
  9. c0nd3v

    c0nd3v

    Joined:
    May 8, 2019
    Posts:
    30
    Here's a quick workaround for now while we wait for Unity devs to fix this... Thank me later...

    Code (CSharp):
    1. using UnityEditor;
    2. using UnityEditor.SceneManagement;
    3. using UnityEngine.SceneManagement;
    4.  
    5. namespace c0nd3v
    6. {
    7.     public static class FixCanvas
    8.     {
    9.         [InitializeOnLoadMethod]
    10.         public static void InitializeOnLoad()
    11.         {
    12.             EditorApplication.update += Update1;
    13.         }
    14.  
    15.         public static void Update1()
    16.         {
    17.             // 1. Open game view
    18.             var gameView = EditorWindow.GetWindow(typeof(EditorWindow).Assembly.GetType("UnityEditor.GameView"));
    19.  
    20.             EditorApplication.update -= Update1;
    21.             EditorApplication.update += Update2;
    22.         }
    23.  
    24.         public static void Update2()
    25.         {
    26.             // 2. Open scene view
    27.             var sceneView = EditorWindow.GetWindow(typeof(SceneView));
    28.  
    29.             // 3. Reload scene
    30.             var scene = SceneManager.GetActiveScene();
    31.             EditorSceneManager.OpenScene(scene.path);
    32.  
    33.             EditorApplication.update -= Update2;
    34.         }
    35.     }
    36. }
     
    maxdifraia and Unifikation like this.
  10. MichalGrzech

    MichalGrzech

    Joined:
    Jun 8, 2017
    Posts:
    1
    I can also confirm that it's a bug. After I opened my project today, all values on my buttons on canvas were set to 0...
     
    AlonMixed likes this.
  11. c0nd3v

    c0nd3v

    Joined:
    May 8, 2019
    Posts:
    30
  12. BobberooniTooni

    BobberooniTooni

    Joined:
    Apr 9, 2021
    Posts:
    46
    I am in 2022.3.4 and my canvases are working perfectly except in game builds, where several canvases have their x values reset to 0 every time. I've also upvoted the issue, everyone do the same!
     
    msfredb7 likes this.
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,025
    Unifikation likes this.
  14. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    1,883
    Users voting on such a blatant issue is such a lame cop-out by Unity staff. That crap should not have left the door, it should have been caught by regression testing and flagged as a showstopper for release.
     
  15. Snigros

    Snigros

    Joined:
    Jun 12, 2018
    Posts:
    35
    Also experiencing broken canvas problems using both 2022.3.3f1 and 2022.3.4f1....some UI elements randomly changing their vertical position on the screen in the game window. Overall scaling in the game window also seems to "zoom" in (and cut off top of the game window) even when set to the default scale of 1.

    Very disappointing to see a project breaking bug like this in two consecutive LTS versions! Have had to revert to 2022.3.2f1 as workaround for now... please fix ASAP!
     
    Unifikation likes this.
  16. Tyrant117

    Tyrant117

    Joined:
    Aug 25, 2014
    Posts:
    10
    Yep, just upgraded from 2022.3.0 to 2022.3.4 and my canvases break. It is particularly bad because while switching to game view does rescale them, if they had anchors that got messed up when the canvas loaded with broken size, they stay broken even when correctly rescaled back to normal dimensions.

    Just tested in a fresh project. It happens immediately with the canvas.
    Place new canvas in screen, place images anchored at each corner with offset y values.
    Select scene view, save project, close unity.
    Restart Unity. The canvas will now be broken.
    Click game view, canvas dimensions load, but now all your anchored objects will be reset to y = 0,
     
    Last edited: Jul 2, 2023
  17. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    687
    This is on an LTS release. Stuff like this should not be happening.
     
  18. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,025
    But they are and they have and they will.
     
    BobberooniTooni likes this.
  19. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    86
    Same problem with 2022.3.4 "LTS" :/
     
  20. Devou66

    Devou66

    Joined:
    Apr 6, 2014
    Posts:
    12
    Same issue.
     
  21. unormal

    unormal

    Joined:
    Jan 10, 2012
    Posts:
    65
  22. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,062
    I've just noticed another bug with TMP, in 2022.3.1 (the earlier one before this Canvas issue) wherein a TMP object WITHOUT a Canvas just disappears. In between launches of the Editor. I'd noticed one gone a few days ago, thought it was something of my doing.

    Today, tried to track that one down, and restarted the editor, and text object that's right next to it is "disappeared", too. No zero size issues, nothing wrong with the component per the Inspector values, it's just invisible.
     
  23. Extiward

    Extiward

    Joined:
    Nov 13, 2016
    Posts:
    9
    Encountering the same issue since upgrading to 2022.3.4f1. Quite annoying given it is the LTS version
     
  24. kaychang

    kaychang

    Unity Technologies

    Joined:
    Jan 11, 2017
    Posts:
    7
    Hi, thanks for reporting the bug and apologies for the inconvenience.
    The fix for the bug has landed in the upcoming 2022.3.5f1 release.
     
  25. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    65
    Any workaround for this problem in build? We can't rely on 2022.3.5f1 because of deadline.
     
    msfredb7 likes this.
  26. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    687
    Revert to 2022.3.2
     
  27. Syco753

    Syco753

    Joined:
    Feb 11, 2013
    Posts:
    42
    Same here, if there is a TextMeshPro attached, it's just not visible... Entire UI is broken...
    Please fix this asap.... I can't work :(
     
  28. Syco753

    Syco753

    Joined:
    Feb 11, 2013
    Posts:
    42
    The issue with the TextMeshPro is the same. If you click on ExtraSettings, the Margins are NaN
     
  29. shadowofdarknexx

    shadowofdarknexx

    Joined:
    Aug 17, 2019
    Posts:
    2
    2022.3.5f1 release is not out yet!

    UI glitch is such a basic bug. The testing team should get fired for this. Game developing is already very hard. Don't give us headaches of fixing bugs in LTS builds!
     
  30. maxdifraia

    maxdifraia

    Joined:
    Nov 29, 2015
    Posts:
    2
    I had the worst problems with LTS releases. 2019, 2020... every time is the same story. Now I realize that LTS actually stands for Long Tribulation and Suffering.
     
  31. amateurd

    amateurd

    Joined:
    Nov 1, 2016
    Posts:
    95
    May be related, reported a bug with RectTransform positioning here, affects the LTS versions after 2022.3.1
     
  32. ScorphiusMultiplayer

    ScorphiusMultiplayer

    Joined:
    Nov 10, 2018
    Posts:
    66
    +voted...
    Its already been 2 weeks + since the release of 2022.3.3f.
    When are we getting the 2022.3.5f ?
    Wasted an entire days work and now have to wait for the fix....
     
    LuoxuanLove likes this.
  33. LuoxuanLove

    LuoxuanLove

    Joined:
    Mar 4, 2023
    Posts:
    6
    Same issue. The 2022.3.5f1 version has not been released yet.
     
  34. CastryGames

    CastryGames

    Joined:
    Oct 1, 2014
    Posts:
    76
    SAME problem, please resolv unity
     
  35. Snigros

    Snigros

    Joined:
    Jun 12, 2018
    Posts:
    35
    While I have yet to do extensive testing, the canvas issues I had with 2022.3.3f1 and 2022.3.4f1 appear to have been fixed in 2022.3.5f1 (this is using an upgrade from 2022.3.2f1 - the last version that worked correctly). Thankyou Unity.
     
    BobberooniTooni and amateurd like this.
  36. amateurd

    amateurd

    Joined:
    Nov 1, 2016
    Posts:
    95
    Same here. 2022.3.5 seems to fix it for me.
     
  37. ScorphiusMultiplayer

    ScorphiusMultiplayer

    Joined:
    Nov 10, 2018
    Posts:
    66
    Installed 2022.3.5. Can confirm its fixed.
    I had to reposition all my canvas items but I can now go ahead and update my game.
    Thank you everyone
     
    Tokzikz, BobberooniTooni and amateurd like this.
  38. Notrain0

    Notrain0

    Joined:
    Feb 26, 2023
    Posts:
    7
    Feels like it's back to me ? Is it only me ?