Search Issue Tracker
Won't Fix
Won't Fix in 2023.2.X
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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);
}
Resolution Note (2023.2.X):
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);
}