Search Issue Tracker
Fixed in 1.5.0-preview.12, 2.1.0-preview.12, 3.0.0-preview.12
Votes
0
Found in [Package]
3.0.0
Issue ID
1245104
Regression
No
[TMP] NullReferenceException error is thrown on assigning Font Atlas texture to None
NullReferenceException error is thrown on assigning Font Atlas texture to None.
Steps to repro:
1. Create a new Project.
2. Windows > Package Manager > TextMeshPro(3.00-preview.11) > Update.
3. GameObject > 3D Object > Text - TextMeshPro.
4. Debug Settings > Font Atlas > Select texture to None.
Actual Result:
NullReferenceException error is thrown in the console.
Expected Result:
No error in the console.
Reproducible in:
2020.2.0a11, 2020.1.0b8, 2019.3.0f3.
Tested on TMP Package Version: 3.0.0-preview.11, 3.0.0-preview.1.
Environment:
Occurring on Windows 10 & Mac 10.15.
Stacktrace:
NullReferenceException: Object reference not set to an instance of an object
TMPro.TextMeshPro.ON_MATERIAL_PROPERTY_CHANGED (System.Boolean isChanged, UnityEngine.Material mat) (at library/packagecache/com.unity.textmeshpro@3.0.0-preview.11/scripts/runtime/tmpro_private.cs:335)
TMPro.FastAction`2[A,B].Call (A a, B b) (at library/packagecache/com.unity.textmeshpro@3.0.0-preview.11/scripts/runtime/fastaction.cs:109)
TMPro.TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED (System.Boolean isChanged, UnityEngine.Material mat) (at library/packagecache/com.unity.textmeshpro@3.0.0-preview.11/scripts/runtime/tmpro_eventmanager.cs:57)
TMPro.EditorUtilities.TMP_BaseShaderGUI.OnGUI (UnityEditor.MaterialEditor materialEditor, UnityEditor.MaterialProperty[] properties) (at library/packagecache/com.unity.textmeshpro@3.0.0-preview.11/scripts/editor/tmp_baseshadergui.cs:166)
UnityEditor.MaterialEditor.PropertiesGUI () (at <89a088b11b1f446fb543c196a8473632>:0)
UnityEditor.MaterialEditor.OnInspectorGUI () (at <89a088b11b1f446fb543c196a8473632>:0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <89a088b11b1f446fb543c196a8473632>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor crashes and a window with "GetManagerFromContext: pointer to object of manager 'MonoManager' is NULL (table index 5)" error is shown when launching a freshly created project
- Editor Windows dragging behavior is erratic/glitchy when a specific multi-display setup is used and the Editor window is not on the main display
- Meta Quest missing an icon in Build Profiles window in U6.0
- Foldout arrow indent is misaligned in the Inspector when used for Arrays or Lists
- Material import pipeline strips properties when it is added with a script
Resolution Note (fix version 1.5.0-preview.12, 2.1.0-preview.12, 3.0.0-preview.12):
setting the atlas texture of a text object to None or Null will result in the text rendering as white blocks. Although the NullReferenceException will no longer occur, it is not advisable to set the atlas texture of a text object to None / Null.
The fix for the behavior will be included in the next release of the TMP package which is expected to be Preview 12.