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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
Add comment