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

Feature Request Shadows for UI elements

Discussion in 'UI Toolkit' started by Hertzole, Jan 29, 2020.

  1. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    416
    Hello!

    A little feature I would love to see in USS is a shadow property, like the one available in CSS, primarily box-shadow (but text-shadow would also be very cool!). Is it planned sometime in the future? Personally I like to make flat UI with hard "shadows" and sure, it could be done with two VisualElements right now but it feels like it could be prone to layout problems and be a bit clunky to work with. It would be awesome to have it as a property. :)

    As a bonus question, is there a way to see the planned properties, if any new is on the way? I've checked the roadmaps a few times but it's mostly the general stuff and no new styling properties.
     
  2. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    328
    Noted :)

    We don't have a detailed list of upcoming properties. We'll look into that once we're done with the move into a package.

    Cheers,
     
  3. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    I really have to second this. it'd fix an issue unity's previous UI systems have all had
     
  4. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,848
  5. The-Wand3rer

    The-Wand3rer

    Joined:
    May 14, 2019
    Posts:
    31
    Allowing us to specify HDR colors would also be great, as it could allow us to make UI elements glow.
     
    RamjobFlux likes this.
  6. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    the color picker should just have an HDR/LDR toggle (when not specified by a ColorUsageAttribute or specific use cases)
     
  7. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    366
    +1

    Designers love giving UI elements a shadow and at the moment it is only possible to mock shadowds with borders and transparency does not work on borders.
     
  8. Ragueel

    Ragueel

    Joined:
    Jun 2, 2018
    Posts:
    39
    Yes, drop shadows are very important in the modern UI.
     
  9. etienne_unity

    etienne_unity

    Unity Technologies

    Joined:
    Aug 31, 2017
    Posts:
    102
    Mj-Kkaya, PutridEx and Arlorean like this.
  10. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    416
  11. etienne_unity

    etienne_unity

    Unity Technologies

    Joined:
    Aug 31, 2017
    Posts:
    102
    We're investigating box shadow and background effects in general, trying to find the right balance between flexibility and performance. Stay tuned!
     
    Arlorean, Ragueel, jGate99 and 2 others like this.
  12. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,848
    yes, background with round corners, gradients, shadow etc
     
  13. MathewHenson

    MathewHenson

    Joined:
    Apr 6, 2019
    Posts:
    2
    +1 This would be amazing
     
  14. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    413
    Would be good to have separate quads for shadows because right now they barely usable, you can't use big distance without shadows beign clipped.
     
  15. Nexer8

    Nexer8

    Joined:
    Dec 10, 2017
    Posts:
    271
    Any update on this?
     
  16. etienne_unity

    etienne_unity

    Unity Technologies

    Joined:
    Aug 31, 2017
    Posts:
    102
    Thanks for keeping us honest :)

    Unfortunately, no update on this front just yet. These effects depend on changes we need to bring to our rendering system to also enable styling features like
    z-index
    , and we've been working on other features since my last post on this thread (transitions, transforms, crisp rendering without multisampling, and so on).
     
  17. mikejm_

    mikejm_

    Joined:
    Oct 9, 2021
    Posts:
    346
    Is there any update on this? I am converting my project over to Unity Toolkit UI for the greater efficiency it should provide. I was using True Shadow which creates great shadows on the old UI system:

    https://assetstore.unity.com/packages/tools/gui/true-shadow-ui-soft-shadow-and-glow-beta-176322

    But I will need some similar system in Unity Toolkit UI for my project to be viable in it. Do you have any ETA or best guesses on when this will be done?
     
  18. ChGuidi

    ChGuidi

    Joined:
    Dec 28, 2021
    Posts:
    105
  19. Neiyra

    Neiyra

    Joined:
    Apr 19, 2016
    Posts:
    28
  20. drbatuira

    drbatuira

    Joined:
    May 4, 2020
    Posts:
    23
    +1

    @etienne_unity , thank you very much for the transparency.
    This item is extremely important, the possibilities for the layout are expanded in unimaginable ways
     
  21. wethings

    wethings

    Joined:
    Aug 26, 2018
    Posts:
    28
  22. progdamn

    progdamn

    Joined:
    Sep 12, 2020
    Posts:
    2
  23. Anubis_V2

    Anubis_V2

    Joined:
    Dec 11, 2020
    Posts:
    6
  24. SolidDen

    SolidDen

    Joined:
    Jan 12, 2020
    Posts:
    2
  25. AlexanderLott

    AlexanderLott

    Joined:
    Nov 10, 2020
    Posts:
    1
  26. TheSleepyPenguin

    TheSleepyPenguin

    Joined:
    Nov 9, 2013
    Posts:
    5
  27. orb_9

    orb_9

    Joined:
    Feb 10, 2010
    Posts:
    47
    As a lot of people seem to ask for box-shadow.. it might help to push this on the Roadmap page.
    • Goto: https://unity.com/de/roadmap/unity-platform/gameplay-ui-design
    • Select "UI Design" as shown below
    • Find "Additional UI style properties"
    • Click it and choose "Important" or "Critical" (as shown in the second image; I use blend modes in the second picture because I already voted for "Additional UI style properties" and the UI looks different now).
    upload_2022-4-19_17-54-30.png
    upload_2022-4-19_17-57-21.png
     
    fxlange and drbatuira like this.
  28. niuage

    niuage

    Joined:
    Nov 17, 2019
    Posts:
    89
    +1 for box shadows! I don't want to get back to the days of IE6 where we had to make shadows with images :D
     
    ProFiLeR4100 and fxlange like this.
  29. jakob-leitner

    jakob-leitner

    Joined:
    Nov 11, 2020
    Posts:
    16
    +1
    Is there any workaround for now? other than making shadows with images? :confused:
     
  30. FriesePole

    FriesePole

    Joined:
    Sep 13, 2022
    Posts:
    2
    +1
    what is the status now?:)
    do you still need to find a workaround?
     
  31. MohamedBS

    MohamedBS

    Joined:
    May 4, 2021
    Posts:
    3
  32. phelms215

    phelms215

    Joined:
    Jan 7, 2023
    Posts:
    1
  33. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,064
    What you linked is for UGUI not UI Toolkit.

    The thread is about UI Toolkit shadows which is planned in the roadmap as one of the items in "Additional UI style properties". A very much wanted feature at that.
     
  34. yo-aiba

    yo-aiba

    Joined:
    Mar 22, 2019
    Posts:
    1
  35. kathrynrshafer2

    kathrynrshafer2

    Joined:
    Nov 29, 2022
    Posts:
    1
  36. AntKnight23

    AntKnight23

    Joined:
    Aug 28, 2022
    Posts:
    2
    so what have you done exact during the last 1...2...3 years...
     
  37. samudschigo_unity

    samudschigo_unity

    Joined:
    Sep 11, 2021
    Posts:
    2
  38. niuage

    niuage

    Joined:
    Nov 17, 2019
    Posts:
    89
    Is there a roadmap for UI elements? It feels like it's not moving that much anymore :'(
    I havent used it personally but I think we did get background related improvements recently?
     
  39. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    759
    niuage likes this.
  40. niuage

    niuage

    Joined:
    Nov 17, 2019
    Posts:
    89
    Thanks mate. Ok so not that much is going on at the moment but I do like what they have planned for the future at least.
     
  41. tattyd

    tattyd

    Joined:
    Feb 17, 2020
    Posts:
    14
  42. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86