Search Unity

Transparency Bleed

Discussion in 'UI Toolkit' started by piggybank1974, Apr 11, 2021.

  1. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    Unity 20.1.1F
    UI Builder 1.0.0-preview.9
    UI Toolkit 1.0.0-preview.6

    First I did find if I used other versions of the builder 10+ it did not work more on this later.

    this one should be easy to replicate.

    the first Element is a VisualElement in the UIDocument its opacity = 50%

    now the second item should be a button setup this how you like.

    but what I've found is that the parent "VisualElement" makes the button semi-transparent also and this is incorrect, in this case, the VisualElement represents a DIV in HTML terms.

    for example what If I wanted a container element with is background-color set to rgba(0,0,0,0.5) which is semi-transparent but any inner element is "fully opaque" currently this cannot be done, or how I'm doing it anyway.

    Package Manager

    I would have thought the PM was more intelligent and only allowed you to install the version that was compatible with the version of unity you were using eg. a setting min/max or max meaning the latest version.

    I had to read several forum posts just to get things working, which is NOT what developing with unity should be about, grant things have got more fragmented in recent years, and things just not getting finished etc.
     
  2. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    Looks like I solved it me been stupid should have adjusted the background :(