Search Unity

Slider with TextField enabled shows no text with Unity Default Runtime Theme

Discussion in 'UI Toolkit' started by FurtherV, May 1, 2022.

  1. FurtherV

    FurtherV

    Joined:
    Apr 28, 2022
    Posts:
    2
    Like the title says, when I place a slider and enable its input field, I can not see the text I am entering in the input field. How would I change this?
    If I use any of the editor themes, so not the "Unity Default Runtime Theme" in the UI Builder it shows values, but not the version used inside unity, which uses the "Unity Default Runtime Theme"!

    How to fix this?
     
  2. griendeau_unity

    griendeau_unity

    Unity Technologies

    Joined:
    Aug 25, 2020
    Posts:
    248
    We've seen problems with this recently, there has been a big refactoring of how text is handled in UI Toolkit and it affected the runtime theme.
    I can't seem to be able repro, so it was probably fixed recently. Which Unity version are you on?
     
  3. FurtherV

    FurtherV

    Joined:
    Apr 28, 2022
    Posts:
    2
    I am using unity editor version 2021.3.1f1. So it seems this is the newest LTS version?
    Do I have to switch to the alpha / beta version or should the fix already be included in 2021.3.1f1?
     
  4. griendeau_unity

    griendeau_unity

    Unity Technologies

    Joined:
    Aug 25, 2020
    Posts:
    248
    I see, that version should not have been affected by the refactoring, so it's probably something else.
    You can try to use the Window -> UI Toolkit -> UI Debugger to pick the text field and see if the text is there. Maybe it's does not have a visible color? I'll ask the team if this is something we are aware of and get back to you!
     
    Nephenris likes this.
  5. dasAndy

    dasAndy

    Joined:
    Jun 3, 2019
    Posts:
    4
    Same Problem here.
    I found that padding is set to 10px by default. If i override this per custum uss to 0px the slider input shows up correctly
     
    AmazingRuss likes this.
  6. Nephenris

    Nephenris

    Joined:
    Feb 8, 2023
    Posts:
    4
    Same. Padding is the pb - if we change it in UI Toolkit debugger , it works.
    Why it is sitll not fixed ?
     
  7. griendeau_unity

    griendeau_unity

    Unity Technologies

    Joined:
    Aug 25, 2020
    Posts:
    248
    Please submit a bug using Help -> Report a Bug... in Unity