Search Unity

bi-directional text

Discussion in 'Editor & General Support' started by CrystalVisions, Dec 8, 2010.

  1. CrystalVisions

    CrystalVisions

    Joined:
    Sep 11, 2007
    Posts:
    61
    I created a couple of text fields in order to test a www form and found that the text was going in from right to left instead of left to right. I checked my language settings and it is set to English. I don't know what could cause this. In order to make it more interesting, when I started typing in the second text field the typing was left to right, so I switched back to the first text field and it started typing left to right then "decided" to switch directions in the middle of a word. This is very frustrating. I already checked the apple help (which didn't really help) and would love to hear any and all ideas about why this might be happening.
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Can you post the OnGUI code that you are using to display the text fields? I suspect this is a bug but it would be worth checking out the code before reporting it.
     
  3. CrystalVisions

    CrystalVisions

    Joined:
    Sep 11, 2007
    Posts:
    61
    Thank you so much for your rapid response. I was tearing out my hair.
    I am afraid posting the code won't help because I am using a GUI Framework.

    After digging into the framework I commented out a line of code that sorted the children of a container (I had added that code to make sure that dropdown lists would always be on top so that they would not be covered by other gui elements)


    Commenting out the sort call fixed the problem. I don't know why it caused the problem, and it is a miracle that I tried commenting out that code LOL.

    Sorting the ArrayList that holds the children objects of the container has the sole purpose of changing the order of displaying the children objects - and in this case since there were no popup lists present, it shouldn't have done anything... so it really makes no sense to me why the problem happened.

    What determines the direction of text in the engine? Is it the font? Or is it the language chosen in system preferences?
     
    Last edited: Dec 9, 2010