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.

Bug My text in canvas disappear when resizing

Discussion in 'Editor & General Support' started by mrobiwankenobi, Jan 27, 2023.

  1. mrobiwankenobi

    mrobiwankenobi

    Joined:
    Aug 7, 2021
    Posts:
    5
    Hello, hope you're all doing well. Need an assistance if someone could help with this issue that might be just a little thing but which is strange.
    i'm a beginner so please talk me like a full newbie here :)

    As you can see on screenshot 1 I have a canvas menu that works perfectly in the editor and on build on my laptop (Macbook pro).




    When I open the build on my Desktop Mac, it works. Until I resize the window then my canvas automatically become white like in screenshot 2. It is strange that this not occurs on my laptop. And when I get restart the build, then the menu show again with the same resizing I made, if I change again the size of the window, blank again. I might think it's not like it disappears but their is something masking it, don't know. Again this not occur on my laptop which drive me crazy.




    Don't know from where come the issue I put some screenshots about my config... I tried several setups even in my player setting (in text mesh pro like resizing text and so) but still got the issue. Thank you if anyone could conduct me in some logic thoughts here.

    Canvas where it occurs setting:



    The menu panel and buttons settings:




     
    Last edited: Jan 27, 2023
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    32,222
    Check the horizontal / vertical overflow settings on the text object itself.

    If they are set to Truncate then they might blank the text unexpectedly, as the actual text "squares" are almost always larger vertically than the actual letter itself.

    Otherwise, check your anchoring and scaling:

    Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc:

    https://forum.unity.com/threads/inc...size-between-two-people.1130146/#post-7261747

    https://forum.unity.com/threads/game-ui-button-size-problem.1142650/#post-7337383
     
  3. mrobiwankenobi

    mrobiwankenobi

    Joined:
    Aug 7, 2021
    Posts:
    5
    Thank you for your feedback Kurt.
    Here are my settings it was not Truncate.
    I literally tried all the options from there, selecting, deselecting (to also learn the effects of them) got the same issue each time on the build from my Desktop.
    Any other suggestion here? Might it come from somewhere else in the project?


     
  4. mrobiwankenobi

    mrobiwankenobi

    Joined:
    Aug 7, 2021
    Posts:
    5
    Found out from where came the bug. From the material of text mesh pro, had to turn it from distance field to distance field overlay. Too much options/parameters for a simple text ;). Will check if this doesn't create unsuspected bugs in my menu later. Hope this can helps some once.

    Ps: thank you again Kurt. You're great to help so much people with your experience

     
    Last edited: Jan 30, 2023