Search Issue Tracker

Won't Fix

Votes

0

Found in

2020.1.0a5

2020.3.22f1

2021.2

2022.1

Issue ID

1382181

Regression

Yes

ArgumentException from hierarchyWindowItemOnGUI is thrown when leaving Prefab Mode

Scene/Game View

-

How to reproduce:
1. Open the user attached "HierarchyWindowItemOnGUI.zip" project
2. Enter the "SampleScene" Scene
3. Open the "Prefab" Prefab in the Assets folder
4. Exit the Prefab Mode by pressing the back arrow in the Hierarchy
5. Open the Console

Expected result: No errors
Actual result: An error is thrown

Reproducible with: 2020.1.0a5, 2020.3.24f1, 2021.2.5f1, 2022.1.0a16
Not reproducible 2019.4.33f1, 2020.1.0a4

Notes:
- Error "ArgumentException: Getting control 1's position in a group with only 1 controls when doing repaint"

  1. Resolution Note:

    Using GUILayout methods is not supported from the hierarchyWindowItemOnGUI callback due to the culling logic of the Hierarchy Tree View. That is why the row rect is provided as input. Please calculate rects for row widgets using this input rect.
    This information will be added to the documentation for hierarchyWindowItemOnGUI.

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.