Search Issue Tracker
Fixed
Fixed in 2023.3.0b5
Votes
0
Found in
2023.2.4f1
2023.3.0b1
Issue ID
UUM-59486
Regression
No
TypeLoadException is thrown when entering an invalid type in the Binding window in UI Builder
Reproduction steps:
1. Open the attached “My project (13).zip“ project
2. Open the UI Builder (Window> UI Toolkit> UI Builder)
3. Drag and drop the Visual Element element from the Library window into the Hierarchy window
4. Select the Visual Element
5. In the Inspector window, click the 3 dots next to “Tooltip” and click “Add Binding”
6. In the Add Binding window select Type
7. In the Data Source field type any invalid type (e.g.: "Asdf")
6. Press Enter
7. Observe the Console window
Expected result: No exception is thrown
Actual result: TypeLoadException is thrown
Reproducible with: 2023.2.4f1, 2023.3.0b1
Could not test with: 2021.3.33f1, 2022.3.16f1 (no option “Add Binding”)
Reproducible on: Windows 11, macOS 14.0 (Intel) (by the reporter)
Not reproducible on: No other environment tested
Exception:
TypeLoadException: Could not load type '.Asdf' from assembly 'UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
System.RuntimeTypeHandle.GetTypeByName (System.String typeName, System.Boolean throwOnError, System.Boolean ignoreCase, System.Boolean reflectionOnly, System.Threading.StackCrawlMark& stackMark, System.Boolean loadTypeFromPartialName) (at <a35250a304174d009b77e5c5f6695f54>:0)
System.RuntimeType.GetType (System.String typeName, System.Boolean throwOnError, System.Boolean ignoreCase, System.Boolean reflectionOnly, System.Threading.StackCrawlMark& stackMark) (at <a35250a304174d009b77e5c5f6695f54>:0)
System.Type.GetType (System.String typeName, System.Boolean throwOnError) (at <a35250a304174d009b77e5c5f6695f54>:0)
UnityEngine.UIElements.UxmlUtility.ParseType (System.String value, System.Type defaultType) (at <0a09981377f644aea2211f89527f07c3>:0)
UnityEngine.UIElements.UxmlSerializedData:Deserialize(Object, UxmlAttributeFlags)
Unity.UI.Builder.BuilderUxmlAttributesView:CallDeserializeOnElement()
Unity.UI.Builder.BuilderUxmlAttributesView:ProcessBatchedChanges()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Memory leak when a lot of UI elements are spawned and despawned
- Warnings are not logged in the Console window when using external code analyzers
- Errors “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 288“ appear constantly when Prefab is open
- Crash on PPtr<Shader>::operator or NullException errors spammed in console when calling Dispose() on null GraphicsBuffer with baked Reflection Probes
- “EndRenderPass: Not inside a Renderpass” and other Render Graph errors in the Player when Render Graph is enabled and Overlay UI is used
Add comment