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
- Shader warning in 'Hidden/Core/DebugOccluder' thrown after building High Definition 3D Sample Template
- Audio Mixer “+” buttons overlap with UI when the Audio Mixer window layout is set to Horizontal
- "Clear" button in the "Set project display name" closes all the pop-up instead of clearing just a name from the field
- Video Player renders no video on specific devices when using Vulkan
- The Editor slows itself down by showing tons of warnings when the majority of TransformAccessArrays content are NullRefs
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);
}