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

5.1.1f1 -> Caret woes

Discussion in 'Editor & General Support' started by Kronnect, Jun 20, 2015.

  1. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,876
    I can't believe but after years, still in 5.1.1 the caret of the input field component is not correctly aligned with the text line. I have filled another bug.

    PLEASE.
     
  2. Jon-Jennings

    Jon-Jennings

    Joined:
    Jun 20, 2015
    Posts:
    5
    That's the least of my problems. I've just updated to 5.1.1f1 and it's a disaster.

    - All my UI's, buttons, images etc. are pink on an Android build.
    - The animations all changed to generic from human, just figured it out because nothing was working at all, but they still aren't the same as they were before.
    - Now it just hangs up when I try to do an Android build.

    I need to update the new version of this game on Google-Play ASAP.

    Any advice out there??
     
  3. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,876
    I've submitted a repro to Unity. Hope they definitely fix this ASAP.
     
    Last edited: Jun 22, 2015
  4. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Remove the URL from your post. We can see your bug history.
     
  5. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,876
    I'm attaching here the repro so perhaps someone can figure out what the source of the problem is.
     

    Attached Files:

  6. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    You changed the placeholder and text objects with "best fit" and custom positions. The caret seems to be written for a specific size. Eeverything is okay as long as you don't change the font.
     
  7. OldManAnimal

    OldManAnimal

    Joined:
    Jul 10, 2014
    Posts:
    45
    You can 'fix' the problem by adjusting the rect transform y position of the Input Caret object that's created at runtime. Probably best to change it in LateUpdate(). How much you have to adjust it depends on the font size and the vertical alignment, you'll probably have play around and set a specific adjustment per input field.

    Also, I believe that the position of the Caret rect transform is set on every LateUpdate of the input field so you have to fix the position every LateUpdate. Just make sure the script execution order for the correction script you write is set to always run after input fields LateUpdate.
     
  8. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,876
    That can work for a single input field but I have other screens where I have a data grid with lots of input fields. And other windows with more input fields. It would be a pain to add those running scripts.
     
  9. BenouKat

    BenouKat

    Joined:
    Feb 29, 2012
    Posts:
    222
    I had this issue too, it happens all the time BUT not on all text field. I don't know how to reproduce it but it's here and it's annoying.

    This is weird. Have you tried to disable/enable the UI ? Sometimes the UI brokes graphics but it's only in the editor and disappear if you switch scene / enable-disable the UI.
    We upgraded to 5.1.1 and we didn't face this problem.
     
  10. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,876
    btw, Stephan is adding editing capabilities to his TextMeshPro asset.
     
  11. OldManAnimal

    OldManAnimal

    Joined:
    Jul 10, 2014
    Posts:
    45
    I think all that needs to be done to reproduce this bug is to make an input field and use a font size in the text child object that's higher or lower than the default size. So reduce or increase the font size and you'll see the caret position becomes more off as you get higher or lower in size.
     
  12. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    225
    I'm confirming this issue. This is a regression bug. It was not present in 5.0.
    I also confirm Animal2 observation. Use a custom font with a big font size.
     
  13. BenouKat

    BenouKat

    Joined:
    Feb 29, 2012
    Posts:
    222
    Hi, the issue is still here in 5.1.1p3. Any news about this ?

     
  14. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,876
    Hi @BenouKat,

    I got a reply from Unity QA. They say this issue it's been fixed! But they're releasing the fix in 5.2 beta. It should be available on current beta, but I haven't had a chance to try it yet.
     
  15. BenouKat

    BenouKat

    Joined:
    Feb 29, 2012
    Posts:
    222
    Hi @Thrawn75 ,

    Thanks for the update, we are waiting for 5.2 but the beta is too instable to work with for now, so we'll wait ;) I'm glad it's fixed :)