Search Issue Tracker

Won't Fix

Votes

0

Found in

2020.3.37f1

2021.3.7f1

2022.2.0b3

2023.1.0a4

2023.2.0a1

Issue ID

UUM-11188

Regression

No

Interactions in a ”MultiColumnTreeView” TreeView containing “IMGUIContainer” are not working

--

-

How to reproduce:
1. Open project “TreeViewImGUI.zip”
2. Open Menu > TreeView Examples > Multi Columns
3. Try to select items, edit fields or use the scroll bar and observe the result

Expected result: Interactions are working
Actual result: Interactions are not working

Reproducible with: 1.0.0-preview.18 (2020.3.37f1), 1.0.0 (2021.3.7f1, 2022.1.11f1, 2022.2.0b3, 2023.1.0a4)

Reproduced on: macOS 12.4 (Intel)

  1. Resolution Note:

    Indeed, the onGuiHandler is never called for the MouseDown/MouseUp events if the multi colown tree view is used inside an IMGUI container, which is why the the UI cannot be interacted with. If the multi column tree view is not used inside an IMGUI container, the issue does not occur.

    The root cause of this issue is deep within the framework and will not be solved at this point, however we can offer a workaround: you may set the height of the IMGUIContainer like in this modified snippet taken from MultiColumnWindow.cs

    private void CreateGUI()
    {
    var root = rootVisualElement;
    var container = new IMGUIContainer(() =>
    {
    InitIfNeeded();

    // SearchBar (toolbarRect);
    // BottomToolBar (bottomToolbarRect);
    DoTreeView(multiColumnTreeViewRect);
    });

    // Make sure the height of container is not zero so that the IMGUI
    elements receive mouse events
    container.style.height = new StyleLength(new Length(100, LengthUnit.Percent));
    root.Add(container);
    }

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.