Steps to reproduce:
- Create a new Unity project using the Universal 3D template
- Create a UI Toolkit Visual Element in the Hierarchy (UI Toolkit > Standard Elements > Visual Element)
- Enter editing stage
- Select "Type" under the Bindings in the Inspector
- Click the "Select Type..." button and choose any type
- Click the burger button and select "Unset" or "Unset All"
- Unselect the Visual Element in the Hierarchy by clicking on an empty space
- Select the Visual Element in the Hierarchy
- Observe the Inspector and the Console windows
Actual results: “InvalidCastException” errors are thrown and the Inspector becomes empty/greyed out
Expected results: No errors are thrown and the Inspector is still functional
Reproducible with versions: 6000.6.0b6, 6000.7.0a3
Can’t test with versions: 6000.0.0f1, 6000.0.80f1, 6000.3.21f1, 6000.5.6f1 (due to no editing stage feature)
Tested on (OS): MacOS Silicon Tahoe 26.5.1, Windows 11
Notes:
- Does not reproduce in the UI Builder