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)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The Scrollbar becomes unusable when adding Elements to the List
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
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);
}