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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
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.