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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution 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);
}