Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Blocking bug: Carets not working in 2022.1

Discussion in 'UI Toolkit' started by oobartez, Jul 20, 2022.

  1. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    164
    Unity 2022.1 has a bug in text fields which causes carets not to be visible on some resolutions and UI scales / DPI resolutions. To reproduce the problem, place a UI Toolkit text field and start the game in different resolutions and UI scales - the caret is visible on some configurations but not others.

    Does anyone know a workaround? This is preventing us from updating to 2022.1, we cannot ship a game with invisible carets.

    There is an issue in the bug tracker:
    https://issuetracker.unity3d.com/is...ence-dpi-does-not-always-appear-when-typing-1

    Not sure if it is the same issue though.

    We tested it on Windows and macOS, Unity 2022.1.8f1.
     
    Last edited: Jul 20, 2022
    pawelduda and kamil-dawidow like this.
  2. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    492
    Hi @oobartez !

    It's a known bug and a high-priority one. We will look into it shortly. l'll need to investigate further to see if there's a workaround. I'll keep you posted.
     
  3. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    164
    @hugobd Thank you for confirming that it's being worked on! Let me know if you need any additional information from us or if you find a workaround. We recently upgraded to 2022.1 but are now facing the prospect of reverting back to 2021.x, reverting changes to our shaders etc. all because of this one issue.
     
  4. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    492
    Hi @oobartez! Could you tell me which Scale Mode you are using and which Scale ratio / reference DPI ? This property can be found in the Panel Settings.

    By default, the cursor is drawn at 1 Pixel wide. From my current findings, it seems that using a scale ratio of less than 1 can result in the cursor being scaled down to less than 1 pixel and thus not appearing. As a temporary workaround, setting the scale ratio to 1 or more should fix the issue.
     
  5. pawelduda

    pawelduda

    Joined:
    Feb 1, 2019
    Posts:
    45
    Hi @hugobd

    To answer your question, we are using Scale Mode: Scale With Screen Size.
    Match Mode is set to Match Width Or Height.
    Reference resolution is set to 1920x1080 and Match is set to 0.8.

    We are using PanelSettings.scale to allow user to adjust UI to their preferences.

    So as far as I understand it, for users with FullHD resolutions or higher (and not decreasing scale too much) there is no problem. But when someone plays in a window, smaller resolution or decreases the scale - caret disappear.

    Any ideas on how to (temp) fix it are more then welcome!
     
  6. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    492
    Hi @pawelduda !

    Unfortunately, there are no workarounds... Good news is we have a fix. It still needs to go through our usual landing process (testing, CI...) and then it will be backported down to 2022.1. I can't say an exact ETA for completing the whole landing process, but we are actively working on it.
     
  7. bk_mechanistry

    bk_mechanistry

    Joined:
    May 5, 2022
    Posts:
    2
    Hi @Hugo
    Is there any progress on backporting this issue to 2022.1?
    It is critical as we cannot release our game with invisible carets.
     
  8. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    492
    The fix has landed in 2023.1, it has been backported to 2022.2 and 2022.1. We are expecting the fix to land in these earlier versions shortly.
     
  9. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    492
    The fixes aforementioned landed in 2022.1 during the weekend. They will be avail,able in 2022.1.18f1 which should be available on September 28 if everything goes well.

    The fixes for 2022.2 are still expected to land shortly.
     
  10. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    164
  11. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    492
  12. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    164
    @HugoBD-Unity @benoitd_unity Are you really suggesting that despite being stuck on 2022.1.6 and already missing three months of important bug fixes, we should wait a few more months for 2022.2 before we will be able to update?
     
  13. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    164
  14. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    164
    @HugoBD-Unity I can see that the bug fix for disappearing carets landed in 2022.1.18 but the scrolls are still not working, so we are stuck on the 3.5 month old 2022.1.6 - and so are probably most developers who use UI Toolkit.
     
  15. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    492
    Hi @oobartez the scrolling issue is fixed and should land in 2022.1 shortly. Again, sorry for the delays
     
    oobartez likes this.