A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate in the Unity community.
Separate names with a comma.
@jonathanma_unity When I select an item in the list and then select something from another list I'd like the first selection to fade out a bit...
Alright, I figured it out. .unity-list-view__item { background-color: red; } .unity-list-view__item:hover { background-color: blue; }...
@jonathanma_unity I found two other selectors: .unity-list-view__item--alternative-background .unity-list-view__item--drag-hover Changing their...
@jonathanma_unity Wow, that was pretty simple. Thank you!
None that are built into UIToolkit as far as I know, but this works: visualElement.transform.rotation *= Quaternion.Euler(0f, 0f, 90f);
Bad solution: overwrite the background color of each selected item in the ListView. Then I also have to manage when an item is hovered (and change...
IStyle style = visualElement.style; style.width = 5f; style.height = 10f; This is how I do it. Not sure if it's the correct way to do it though.
I think we might be misunderstanding each other. All my testing is during runtime. All UI is runtime UI (not Editor UI). "When you say "during...
I don't understand. I'm not using Preview, so that shouldn't be the problem. I'm just changing properties (like Focusable) on elements in UI...
Thanks, that works.
Yes and yes. Honestly it's really hard to test this because it seems random how it works each time I try. Part of the fault may be in UI Builder...
I tried to test, but at the moment my ListView doesn't respond to any key input (both ListView and container are focusable). However I tried the...
That solved it, thanks. listView.Q("unity-content-container").focusable = false; Though the container, when still focusable, seems to still take...
You're welcome. Update: Doing ContainsPoint on each panel doesn't work. The right one simply always returns false. Left works fine.
Sometimes ListView takes arrow input (and moves up/down the list) even though it is not Focusable. When it is Focusable but not currently in focus...
To clarify, it works in most cases. Just run ContainsPoint on the root VisualElement. But in my case I have a panel on the left and one on the...
visualElement.ContainsPoint(Input.mousePosition) seems to work, but is not perfect.
Your root is likely shrinking to the size it needs for its children. Try this: rootVisualElement.style.flexGrow = 1f;
In the old UI system we have EventSystem.current.IsPointerOverGameObject() to check if mouse is on a UI element. Is there anything similar for...
Since you haven't had another response I'll take a guess. Maybe you need to .Refresh() after updating?