unity-game-engineui-toolkit

Remove selection from ListView element in UI Toolkit


When I drag the elements inside the ListView component, in the new UI Toolkit system, the element selected get white background but I want it to be transparent.

I just want to drag the elements like a list but without changing the elements background color. enter image description here

I've tried a lot of things with the new API but could not figure it out. I tried change the element background, disable listview general properties, research in google but nothing

I would like if you guys can help. Thanks!


Solution

  • Write this in your USS file. It will rewrite the built-in properties

    .unity-list-view__item {
        background-color: rgba(0, 0, 0, 0);
    }