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

TextField displaying input backwards

Discussion in 'Immediate Mode GUI (IMGUI)' started by fellipeml, Aug 27, 2009.

  1. fellipeml

    fellipeml

    Joined:
    May 12, 2009
    Posts:
    74
    Hi there,
    Ive made a windwow using Unity GUI for my in-game chat and my textField is behaving in a strange manner:

    Sometimes (seems randomly) it receives my input and displays it backwards, so if i type "test 1 2 3" it displays "3 2 1 tset" - the cursor stays still at the first position of the TextFIeld. This strange behaviour stops when i close/open the window again (and comes again in a "random" ocasion).

    Im sure that the window wich the TextField is contained have an unique WindowID, and i set the focus (using GUI.FocusControl) to this TextField only once, when the window is opened.

    my text field:

    Code (csharp):
    1.  
    2.         GUI.SetNextControlName ("MessageField");
    3.         m_inputMessage = GUI.TextField(l_textFieldRect, m_inputMessage,maxLength);
    any ideas are welcome.

    thanks!
     
  2. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    Looks like a bug to me,

    you could reassemble that issue in a small project and send it to the developers + descriptions on how trigger that.
     
  3. sidestepper

    sidestepper

    Joined:
    Oct 2, 2008
    Posts:
    96
    BUMP

    This is an old thread, but the bug was never fixed, twice now I've had this exact same problem. Once in the Unity editor and had to restart unity to fix it, and just now in my published web app in browser, restarting the browser did not fix this.

    What's interesting is it only will happen to the last text field in a window, and only occasionally but once it starts it won't stop. Not sure if that will help devs in finding it. I can't submit a project to repeat this, because there's no way I can find the exact way to replicate it. It truly is random(Which I know is impossible, but it might as well be.)

    All I can suggest is usually the more complex the gui the more likely it is to happen. In my project there are roughly 6 draggable windows and probably 20 to 30 text fields across those windows.
     
  4. Mortoc

    Mortoc

    Joined:
    Nov 3, 2006
    Posts:
    50
    I'm getting this in two GUIs, one that's very complex (it contains a few GUI elements for each of a user's facebook friends, so it can be hundreds of elements) and one that's just a window with a textbox and a button in it.

    I'm not sure how to specifically repro this, sometimes restarting the app will fix it, other times the bug persists.
     
  5. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Are you using the latest version of Unity?
     
  6. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Guys,

    in general, if you think you have found a bug in Unity, please send us a bug report that includes your project (or a cut down one) that shows the issue. One of my QA team can then investigate for you, and if we can reproduce the problem we can get Development to fix it.

    (I have searched our bug database and didn't get any hits on this issue.)

    Thanks,
    Graham
     
  7. Mortoc

    Mortoc

    Joined:
    Nov 3, 2006
    Posts:
    50
    I upgraded from 2.6.0 to 2.6.2 and I haven't seen the issue again yet.
     
  8. devast3d

    devast3d

    Joined:
    May 30, 2010
    Posts:
    76
    got same bug few minutes ago.. digged forum, seems like this is known problem, still no1 knows how to fix it!
     
  9. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    The bug database still doesn't seem to have a record of this bug. It would be great if you could file a report for it (menu: Help > Report A Problem) and include a project that demonstrates the bug.
     
  10. devast3d

    devast3d

    Joined:
    May 30, 2010
    Posts:
    76
    i couldn't report a bug due to weird proxy settings on my work, though i never had that issue again. it is truly a mystery :?
    but i remember that restarting unity solved the problem for me. i'll send bug report from home when this problem will occur again.
     
  11. JAHansens

    JAHansens

    Joined:
    Aug 21, 2010
    Posts:
    7
    I had a similar problem occur if you have a GUILayout.TextField then a GUILayout.TextArea the TextArea will not operate correctly showing the described behavior. I fixed this by putting in a second GUILayout.TextArea between the two that is one pixel wide add drawing with an invisible style.