Search Issue Tracker
Fixed in 2021.2.X
Votes
0
Found in
2021.2.0a14
2021.2.0a17
Issue ID
1337191
Regression
Yes
UI Toolkit window text disappears and throw MissingReferenceException on reimport on Windows with Editor Font set to System Font
Steps to reproduce:
1. Create/Open any Unity project
2. Make sure "System Font" Editor Font is selected in Preferences
3. Open Window -> UI Toolkit -> Samples
4. Enter and exit Play Mode
Expected result: UI is rendered as expected, no errors are thrown
Actual result: Open UI Toolkit windows throw MissingReferenceException errors, UI becomes corrupted and text is not rendered
Reproduced with: 2021.2.0a17, 2021.2.0a14
Didn't reproduce on: 2021.2.0a13, 2021.1.8f1, 2020.3.9f1, 2019.4.27f1
Note: Only reproduced on Windows with System Font, all fonts on macOS work as expected.
Error:
MissingReferenceException: The object of type 'Material' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object.get_name () (at <b603aff9c08241b8beccabaa6d7037b0>:0)
UnityEngine.UIElements.UIR.Implementation.UIRStylePainter.DrawTextCore (UnityEngine.UIElements.MeshGenerationContextUtils+TextParams textParams, UnityEngine.UIElements.ITextHandle handle, System.Single pixelsPerPoint) (at <d98a0f9d3a9a450c9f1ea4983cb665e9>:0)
UnityEngine.UIElements.UIR.Implementation.UIRStylePainter.DrawText (UnityEngine.UIElements.MeshGenerationContextUtils+TextParams textParams, UnityEngine.UIElements.ITextHandle handle, System.Single pixelsPerPoint) (at <d98a0f9d3a9a450c9f1ea4983cb665e9>:0)
UnityEngine.UIElements.MeshGenerationContextUtils.Text (UnityEngine.UIElements.MeshGenerationContext mgc, UnityEngine.UIElements.MeshGenerationContextUtils+TextParams textParams, UnityEngine.UIElements.ITextHandle handle, System.Single pixelsPerPoint) (at <d98a0f9d3a9a450c9f1ea4983cb665e9>:0)
UnityEngine.UIElements.TextElement.OnGenerateVisualContent (UnityEngine.UIElements.MeshGenerationContext mgc) (at <d98a0f9d3a9a450c9f1ea4983cb665e9>:0)
UnityEngine.UIElements.VisualElement.InvokeGenerateVisualContent (UnityEngine.UIElements.MeshGenerationContext mgc) (at <d98a0f9d3a9a450c9f1ea4983cb665e9>:0)
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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Add comment