Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bug NullReferenceException: Object reference not set to an instance of an object

Discussion in 'UGUI & TextMesh Pro' started by LexaMV, Aug 31, 2020.

  1. LexaMV

    LexaMV

    Joined:
    Feb 20, 2018
    Posts:
    13
    TextMesh Pro 2.1.1

    Hello everyone, I have such a mistake

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.EditorGUILayout.IsChildrenIncluded (UnityEditor.SerializedProperty prop) (at <9a184ab867bb42c296d20ace04f48df3>:0)
    UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, UnityEngine.GUILayoutOption[] options) (at <9a184ab867bb42c296d20ace04f48df3>:0)
    TMPro.EditorUtilities.TMP_EditorPanelUI.DrawMaskable () (at Library/PackageCache/com.unity.textmeshpro@2.1.1/Scripts/Editor/TMP_EditorPanelUI.cs:80)
    TMPro.EditorUtilities.TMP_EditorPanelUI.DrawExtraSettings () (at Library/PackageCache/com.unity.textmeshpro@2.1.1/Scripts/Editor/TMP_EditorPanelUI.cs:46)
    TMPro.EditorUtilities.TMP_BaseEditorPanel.OnInspectorGUI () (at Library/PackageCache/com.unity.textmeshpro@2.1.1/Scripts/Editor/TMP_BaseEditorPanel.cs:308)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass55_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <9a184ab867bb42c296d20ace04f48df3>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Appears when you hover the mouse over the ExtraSettings, Face, Outline sections
     

    Attached Files:

  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    5,115
    The following change should resolve this issue.

    upload_2020-8-31_0-16-32.png

    In order for this change to be persistent, you will need to make the change to the TMP package files contained in the global package cache "cache\packages\packages.unity.com\com.unity.textmeshpro@2.1.1" otherwise, the change will be reverted when you close / re-open Unity.

    This change will be included in the next release of the TMP package.
     
    sarynth likes this.
  3. LexaMV

    LexaMV

    Joined:
    Feb 20, 2018
    Posts:
    13
    thanks, this fix solves the problem
     
  4. sarynth

    sarynth

    Joined:
    May 16, 2017
    Posts:
    51
    I'm using com.unity.textmeshpro@3.0.1 and adding this solved my problem. Seems like it may still be an issue. (You mentioned 2.1.1)
     
unityunity