Search Unity

Unity 5.3 UI Bugs

Discussion in 'UGUI & TextMesh Pro' started by oleggelezcov, Dec 11, 2015.

  1. oleggelezcov

    oleggelezcov

    Joined:
    Jan 18, 2013
    Posts:
    13
    I do not like to update the version of the large number of bugs that make Unity. But I need to do and build UWP no choice. After upgrading from 5.1 to 5.3 I have received a lot of mistakes Unity.

    1)
    ArgumentOutOfRangeException: Index and count must refer to a location withing string.
    Parameter name: count
    at System.String.Remove(Int32 startIndex, Int32 count)
    at UnityEngine.UI.InputField.Backspace()
    at UnityEngine.UI.InputField.KeyPressed(Event evt)
    at UnityEngine.UI.InputField.OnUpdateSelected(BaseEventData eventData)
    at UnityEngine.EventSystems.ExecuteEvents.Execute(IUpdateSelectedHandler handler, BaseEventData eventData)
    at UnityEngine.EventSystems.ExecuteEvents.Execute[T](GameObject target, BaseEventData eventData, EventFunction`1 functor )

    2)
    ArgumentException: Mesh can not have more than 65000 vertices
    at UnityEngine.UI.VertexHelper.FillMesh(Mesh mesh)
    at UnityEngine.UI.Graphic.DoMeshGeneration()
    at UnityEngine.UI.Graphic.UpdateGeometry()
    at UnityEngine.UI.Graphic.Rebuild(CanvasUpdate update)
    at UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate()

    3)
    Common UI Flickering.....
     
    MrEsquire likes this.
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    1) Can you file a bug report with an example?
    2) Do you have a lot of UI components or are you using a tiled sprite? The vert count can shoot up quickly with tiled sprites, you can use a custom material and the tiled parameter to do this without a vert increase.
    3) Need a bug report or more information.
     
  3. oleggelezcov

    oleggelezcov

    Joined:
    Jan 18, 2013
    Posts:
    13
    My project is too large to upload, all errors are written off with the Developer Console on my device. Error 2) also appears in the editor 5.3, but not in the previous versions Unity

    Yes, I'm quite intensively use UI, but it was not a problem in Unity 5.0-5.2 on this project
     
  4. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    This is pretty much preventing us from shipping. :(
     
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Can you submit a bug with an example?
     
  6. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    It's a big project, I wouldn't feel comfortable sending the whole thing. I'm finding it difficult to localize, it doesn't happen in the editor, only in the player (OS X Standalone).
     
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Try cutting the project down, its often a good way to identify if the bug is in Unity or your own stuff.
    This may help http://answers.unity3d.com/questions/759081/how-can-i-create-a-minimal-reproducible.html
    If you can create a repro that you are happy to send then pop the bug id in here.
     
  8. MikePanoff

    MikePanoff

    Joined:
    Apr 29, 2015
    Posts:
    21
    It looks like in 5.3 the placeholder text on an empty input field disappears if you click on the field. The placeholder game object is active, but the text component of the InputField.placholder is being disabled.

    Is there a work-around for this?

    This worked fine in 5.2, so I had to roll back to 5.2 until this is fixed.

    Thanks.
     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    That doesn't sound like a bug. Why would you want the place holder text displayed if you are typing in the field?
     
  10. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Yea thats the way the input field has alwasy worked so unless you're seeing something different then what you've described i'd expect it to be the same in 5.2
     
  11. MikePanoff

    MikePanoff

    Joined:
    Apr 29, 2015
    Posts:
    21
    It's not when you are typing in the field. It's when you select the field. For example, if you select on an empty field or backspace on a field until it is empty.

    I should note, I'm seeing this behavior on iOS. Not sure if it's on all platforms now that I rolled back to 5.2
     
  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Ok I see what you mean. Yes that is a bug. I'll take a look.
     
  13. MikePanoff

    MikePanoff

    Joined:
    Apr 29, 2015
    Posts:
    21
    Thank you Karl!

    I have an event handler when selecting the input field, so any suggested work-around to allow us to enable the Placeholder text component is welcome.

    Best,
    -Mike
     
  14. MikePanoff

    MikePanoff

    Joined:
    Apr 29, 2015
    Posts:
    21
    Is there a bug number for this? Was it fixed in 5.3.1?

    Thanks,
    -Mike
     
  15. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    I don't believe its been fixed yet. The holiday period has delayed things. Its on my todo list this week.
     
  16. TimGS

    TimGS

    Joined:
    Apr 24, 2014
    Posts:
    70
    Hope you'll fix this, too:
    http://issuetracker.unity3d.com/issues/using-content-size-fitter-causes-error?page=2

    It's been two months already and still no news.
    I had to review and redo my inventory UI due to this bug. And still haven't found workarounds. The only option is to remove size fitter and calculate size in the script, and that (in case of collections and multiple screen size support) is a pain you know where...
     
  17. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Both these bugs have already been fixed. I have put backport requests in for both and they should be in an upcoming patch. They probably wont be in the same patch as the content size fitter bug is still being reviewed whereas the placeholder fix is already in 5.4.
     
  18. MikePanoff

    MikePanoff

    Joined:
    Apr 29, 2015
    Posts:
    21
    Thanks Karl. Happy New Year!
     
  19. TimGS

    TimGS

    Joined:
    Apr 24, 2014
    Posts:
    70
    It's 5.3.1p3 already and still there's no fix. The issue is closed and marked as fixed. What's going on?
     
    MrEsquire and User340 like this.
  20. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    The issue is fixed but its still on the way to a release. It got held up during code review as its batched in with lots of UI fixes. As soon as it lands it will go straight to a patch release.
     
    User340 likes this.
  21. mogwhy

    mogwhy

    Joined:
    Nov 20, 2014
    Posts:
    36
    ui fixes sounds wonderfull are there some scrollrect fixes included (performance fixes)?
     
  22. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    You mean the flicker bug? Is it coming in the 5.3.x cycle?
     
  23. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    No we are still working on that one. Once its fixed then we will certainly put it into a 5.3 patch. We managed to identify where the issue started, we are currently pinning down exactly what has caused it.
     
    User340 likes this.
  24. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Karl spoke to early, although we thought we managed to identify where the issue started it seems like we were wrong and are back to square one. We will keep posting as we know more.
     
    MrEsquire, rzubek and karl_jones like this.
  25. mogwhy

    mogwhy

    Joined:
    Nov 20, 2014
    Posts:
    36
    So if I release with 5.1.4 and something goes wrong at some point im time I m screwed because there won't be no patch releases for 5.1.4 right?
     
  26. MikePanoff

    MikePanoff

    Joined:
    Apr 29, 2015
    Posts:
    21
    The InputField placeholder bug is still in 5.3.2f1.

    The release notes claim it is fixed but it is not.

    If the input field has it focus and the field is empty, the placeholder text is still missing. It will only show up if the field loses focus.

    Does anyone have any work-around code to fix this? I want some of the 5.3 features, but this bug is a show stopper for my UI-based app.

    Thans.
     
  27. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    I believe that's intentional. How would you expect it to work? No text shows the placeholder?
     
  28. MikePanoff

    MikePanoff

    Joined:
    Apr 29, 2015
    Posts:
    21
    Yes, if you backspace to an empty field, it should give you the placholder text. That's the way it worked in 5.2 and before.

    It gives the user info as to what to type.

    That is standard user interface and the way Apple's native input works.
     
  29. MikePanoff

    MikePanoff

    Joined:
    Apr 29, 2015
    Posts:
    21
    I was able to work around this with the following code. I hope it helps anyone else who has the same problem:

    I created the following script called FixInput.cs and attached it as a component to all of my InputFields.


    using UnityEngine;
    using UnityEngine.UI;

    public class FixInput : MonoBehaviour
    {

    Text m_placeholder;
    InputField m_input;

    ////////////////////////////////////////////////////////////////////
    void Start()
    {
    m_input = GetComponentInParent<InputField>();
    m_placeholder = m_input.placeholder.GetComponent<Text>();
    }


    ////////////////////////////////////////////////////////////////////
    void Update ()
    {
    if (m_input.text == "")
    m_placeholder.enabled = true;
    }
    }
     
    Last edited: Feb 8, 2016
  30. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    I have fixed it now. It will be in an upcoming version.
     
  31. MikePanoff

    MikePanoff

    Joined:
    Apr 29, 2015
    Posts:
    21
    Thank you Karl.
     
  32. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    So it seems this was removed after a previous bug report. I will need to speak to the UI team to see what they think should be the correct behaviour.

    Edit. We are going to revert back to the previous way and keep the placeholder text visible when focused and empty.
     
    Last edited: Feb 12, 2016
    User340 likes this.
  33. mdrotar

    mdrotar

    Joined:
    Aug 26, 2013
    Posts:
    377
    I've run into this problem in 5.3.4. I don't know how many "a lot" of UI elements is, but there are probably around 300 active sprites. Many are off screen. All sprites are packed using Unity's sprite packer. No tiled sprites. I wouldn't say my UI is really that complex though.

    Is this on the radar? Could it not be split into multiple meshes behind the scenes of the UI processing?

    EDIT: Upon further investigation, it appears that putting a lot of text in a UI Text box is my underlying issue. Not a solution to the 65k limit but explains why I reached the limit so easily without a complex UI.
     
    Last edited: Apr 7, 2016
  34. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    981
    This is relevant to this thread's topic, and also somewhat related to InputFields, so instead of making a new thread, I'll post here.

    I am using Unity Web Player on v5.3.4f1. This is what it looks like:



    Same procedures to get here, yet the InputField UI is not showing up.

    Also, Unity Web Player is not throwing any errors or warnings, other than my debug log messages:



    So, I really have no idea how to debug this Player issue.

    If this warrants a new thread, I'll go ahead and delete this post, and then create a new thread. Thanks in advance.