Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Linux - Legacy] GUI.TextField() is broken ?

Discussion in 'Immediate Mode GUI (IMGUI)' started by manutoo, Oct 21, 2015.

  1. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    521
    Hello,

    I just built & tested my game on Linux for 1st time, and I use a custom GUISkin & a custom GUI style for GUI.TextField() and it was not possible to enter any text, while it works on Windows & Mac.
    Removing the custom style fixed the issue, but only in 1 of my 3 Linux setup. (ie: using TextField(Rect position, string text) instead of TextField(Rect position, string text, GUIStyle style) )

    Here a basic example of that it looks like :
    m_GuiSkin is a GUISkin with a custom field named "TextFieldTest" which is a copy of "TextField" but with no texture assigned to all its states.

    Code (CSharp):
    1.     string m_CustomerId = string.Empty;
    2.     GUISkin m_GuiSkin;
    3.  
    4.     void OnGUI()
    5.     {
    6.         m_CustomerId = GUI.TextField(new Rect(50, 50, 400, 100), m_CustomerId, m_GuiSkin.GetStyle("TextFieldTest"));
    7.     }
    My Linux Setups :
    Ok : ubuntu-14.04.3-desktop-i386.iso booting from an USB drive on Core2 Duo with Radeon 5850HD
    Broken : ubuntu-14.04.3-desktop-i386.iso booting from an USB drive on i7 with Geforce GTX 760
    Broken : virtual machine with Ubuntu 12.04LT

    Except that, it seems everything is fine (except on the VM which doesn't support much 3D stuff :p )

    Unity : 5.1.3p3

    Bug Report number : 737409.

    In short, the question:
    Does anyone else use GUI.TextField() on Linux with Custom GUISkin and/or Custom Style ? What is the result ?
     
  2. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    521
  3. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Try to assign a font on the textfield. I had this issue on ios and it worked only by assigning a font.
     
  4. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    521
    @elias_t,
    my custom GUI style had a font assigned, but not the default textfield one. I'll add one and check if it helps or not, and I'll report the result in this topic. :)
     
  5. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    521
    No, no change after have assigned a font to the default textfield of my custom GUISkin... :(

    Note: the default textfield of the default GUISkin is working... (without any assigned font to it)