Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Exception on expanding a TMP_Dropdown with fast enter playmode

Discussion in 'UGUI & TextMesh Pro' started by jdtec, Nov 17, 2020.

  1. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    299
    Expanding TextMeshPro dropdowns causes an exception when fast enter playmode is enabled on subsequent launches of the app in the editor after the first launch.

    I couldn't reproduce this with fast enter playmode disabled so I guess there is some static dependency that isn't cleaned up?

    Exception callstack:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. TMPro.TMP_Dropdown.AlphaFadeList (System.Single duration, System.Single start, System.Single end) (at Library/PackageCache/com.unity.textmeshpro@3.0.3/Scripts/Runtime/TMP_Dropdown.cs:1072)
    3. TMPro.TMP_Dropdown.Show () (at Library/PackageCache/com.unity.textmeshpro@3.0.3/Scripts/Runtime/TMP_Dropdown.cs:890)
    4. TMPro.TMP_Dropdown.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/com.unity.textmeshpro@3.0.3/Scripts/Runtime/TMP_Dropdown.cs:707)
    5. UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at /Applications/Unity/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:50)
    6. UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at /Applications/Unity/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:262)
    7. UnityEngine.EventSystems.EventSystem:Update() (at /Applications/Unity/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:385)
    8.