Search Unity

TextArea entering text backwards

Discussion in 'Immediate Mode GUI (IMGUI)' started by monark, Mar 17, 2009.

  1. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Has anyone seen this before, when I'm testing my TextArea in the editor as I type the i bar stays at the front of the input field meaning that all text comes out backwards.

    So "hello world" comes out "dlrow olleh"

    When I make an exe and run it it works as normal. Any ideas how to stop this happening or what might cause it. Re-starting doesn't help.

    Its totally bizarre, or errazib yllatot
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    It sounds like the editor is confused about language settings (some languages write text right to left, and I think UnityGUI supports this). Not sure what the solution would be but that may be the cause and might point you in the right direction.
     
  3. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    .taht fo draeh t'nevah I, oN. gnitseretnI.
     
    friedbroccolis likes this.
  4. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Just as weirdly as it began it has now righted itself.... :?

    dog knaht.

    I guess just posting here is enough sometimes.
     
  5. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    !hhhhhhhhhhhhggggggggggggrrrrrrrrrrrrraaaaaaaaaaaaaaaAAA.

    it just started doing it again.
     
  6. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    i don't think that is it, when it does it I can't select text, so its either constantly re-setting the i bar position every frame or it thinks the text length is zero.

    i should say as well, that in the same window I have textFields and they all work as normal.
     
  7. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    And....it's working again. This is nuts.
     
  8. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Sounds a lot like an issue I ran into. If it's caused by the same thing that caused this for me, then UT is hot on the trail of a fix which should appear with the next update. Just to be sure though, I'd post a bug report.
     
  9. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Its so random I'm not sure I can send them a reproduceable case. I've been working in this project for 2 weeks and its the first time I've seen it.
     
  10. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    We have had reports of this as well, but haven't been able to reproduce it at all.

    We have mentioned it to UT too, so provided they can find it, it should be fixed soonishy. Yes, soonishy.

    Edit: Monark, as a note, it still might be worth you filing a report from inside the editor, as that will provide your machine details. That might help them reject possible causes more quickly.

    -Jeremy
     
  11. Harry Tuttle

    Harry Tuttle

    Joined:
    Jan 3, 2006
    Posts:
    122
    I have this problem, too. But only in the webplayer and only for some textfields!
     
  12. half_voxel

    half_voxel

    Joined:
    Oct 20, 2007
    Posts:
    978
    I have this problem too.
    It can even start normally and then when I have written like 3 letters it starts
    writing backwards.
     
  13. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    If you have a web player posted that exhibits this then please get a bug logged, include the URL and the source project if you can. Otherwise, steps to reproduce or any other information would help, thanks!
     
  14. Harry Tuttle

    Harry Tuttle

    Joined:
    Jan 3, 2006
    Posts:
    122
    I believe this is an issue with gui control ids changing in windows e.g

    Code (csharp):
    1.  
    2. function OnGUI ()
    3. {
    4.   windowRect = GUILayout.Window (0, windowRect, winProc, "My Window");
    5. }
    6.  
    7. function winProc(windowID : int)
    8. {
    9.   if( today == tuesday )
    10.   {
    11.     pizzaTopping = GUILayout.TextField (pizzaTopping);
    12.   }
    13.   else
    14.   {
    15.     pizzaTopping = GUILayout.TextField(pizzaTopping);
    16.     pizzaSize = GUILayout.TextField (pizzaSize);
    17.   }
    18. }
    19.  
    I have split my windows into completely separate components (e.g I have a askPizzaToppingIfTuesday.js and a askPizzaToppingAndPizzaSize.js code files) and it seems to work so far.

    I haven't finalised the code yet so I'm not 100% sure it's fixed for this reason - but if helps anyone by giving them a new way to refactor their code then good! .... and don't forget I like pizza.
     
  15. MarkFinn

    MarkFinn

    Joined:
    Mar 5, 2009
    Posts:
    10
    I am also experiencing this issue, but just to add cream to the pie, it only occurs on one textfield out of the whole application, and only on built runtimes (not when played in editor).

    I'm putting together a bug report now.
     
  16. AlteredReality

    AlteredReality

    Joined:
    Aug 15, 2011
    Posts:
    397
    I am actually seeing this issue now...is this still a known issue?
     
  17. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    I thought they fixed it, haven't seen it for ages now.
     
  18. AlteredReality

    AlteredReality

    Joined:
    Aug 15, 2011
    Posts:
    397
    I am only seeing this when I am using a TextField in a GUI.Window. Is anyone else seeing this still? Is Unity aware this is still an issue? (Also, I am on the latest 3.4.*)
     
  19. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    I'm on 3.5.1 and still seeing this issue. It's very difficult to give a reproducible case though as it's so random. Happens maybe once a day with someone intensively using a text area control.
    Seeing it inside a GUI.Window too as mentioned above.
     
    Last edited: May 10, 2012
  20. Molix

    Molix

    Joined:
    Apr 24, 2009
    Posts:
    92
    I have experienced this bug sporadically since starting to use Unity years ago. It is still around in 3.5.5f3, because I actually just had it for the first time in Unity's Inspector (a custom inspector that happened to be using GUILayout.TextField rather than the editor version).

    Even after seeing the bug for years I have no idea how to reproduce it, but it would be nice if someone actually looked into it -- the keystroke is actually pre-pended onto the string; it isn't a display issue. That has to narrow it down a bit. Maybe it is switching to a right-to-left language interpretation or something.
     
  21. vdelanno

    vdelanno

    Joined:
    Jan 7, 2011
    Posts:
    6
    Same here, got this bug from time to time in TextFields with Unity 3.5.5... (we only recently switched to 3.5.6 so don't know for sure on this version yet)
     
  22. Capps

    Capps

    Joined:
    Nov 2, 2012
    Posts:
    1
    I get this same error more often than not right now. I am using unity version 3.5.6f4, and it happens with a textfield inside a gui.window. Does anyone have a work around?
     
    Last edited: Nov 2, 2012
  23. Deleted User

    Deleted User

    Guest

    Try replacing GUILayout.TextField with EditorGUILayout.TextField
     
  24. deltagraph

    deltagraph

    Joined:
    Jun 25, 2018
    Posts:
    2
    I found reversed text problem problem with Enable RTL Editor checked. When I type in RTL editor box works OK. If I type in normal text box text is reversed. I ended up unchecking Enable RTL, then entering text in text box and everything worked. Using Unity 2020.3.26f1. I am just getting started with Unity...
     
  25. jensleydale

    jensleydale

    Joined:
    Oct 5, 2022
    Posts:
    1
    THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU!