MISSINGREFERENCEEXCEPTION occurs on selecting a TMP dropdown in the hierarchy after a play occurs

Hi,

Continuous multiple MissingReferenceException errors occur after running a scene with TMP dropdown GameObject, once a TMP dropdown is selected in the hierarchy

This problem seems similar to one already reported as solved:

Deactivating the TMP_dropdown script prevents the errors. Switching to package 1.3.0 returns normal function.

Steps to repro:

  1. create a new project
  2. Hierarchy > right-click > TMP drop down
  3. Import TMP essential
  4. Play scene
    5.select dropdown in the hierarchy

Actual Result:
MissingReferenceException (and other errors) continuously occur:

MissingReferenceException: The object of type ‘TMP_Dropdown’ 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.
UnityEditor.UI.SelectableEditor.StaticOnSceneGUI (UnityEditor.SceneView view) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/SelectableEditor.cs:321)
UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2848)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2125)
UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1986)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at :0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at :0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) (at :0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:244)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

MissingReferenceException: The object of type ‘TMP_Dropdown’ 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.
UnityEditor.UI.SelectableEditor.StaticOnSceneGUI (UnityEditor.SceneView view) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/SelectableEditor.cs:321)
UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2848)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2125)
UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1986)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at :0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at :0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) (at :0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent () (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:412)
UnityEngine.Experimental.UIElements.ImmediateStylePainter.DrawImmediate (System.Action callback) (at C:/buildslave/unity/build/Modules/UIElements/ImmediateStylePainter.cs:113)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoRepaint (UnityEngine.Experimental.UIElements.IStylePainter painter) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:98)
UnityEngine.Experimental.UIElements.VisualElement.Repaint (UnityEngine.Experimental.UIElements.IStylePainter painter) (at C:/buildslave/unity/build/Modules/UIElements/VisualElement.cs:862)
UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTree (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect currentGlobalClip) (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:310)
UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTreeChildren (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect textureClip) (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:328)
UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTree (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect currentGlobalClip) (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:314)
UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.Update () (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:35)
UnityEngine.Experimental.UIElements.VisualTreeUpdater.UpdateVisualTree () (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeUpdater.cs:70)
UnityEngine.Experimental.UIElements.Panel.Repaint (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:507)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:230)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

MissingReferenceException: The object of type ‘TMP_Dropdown’ 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.
UnityEditor.UI.SelectableEditor.StaticOnSceneGUI (UnityEditor.SceneView view) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/SelectableEditor.cs:321)
UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2848)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2125)
UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1986)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at :0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at :0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) (at :0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
UnityEngine.Experimental.UIElements.EventDispatcher.PropagateEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:754)
UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:599)
UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

MissingReferenceException: The object of type ‘TMP_Dropdown’ 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.
UnityEditor.UI.SelectableEditor.StaticOnSceneGUI (UnityEditor.SceneView view) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/SelectableEditor.cs:321)
UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2848)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2125)
UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1986)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at :0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at :0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) (at :0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.EventDispatcher.PropagateToIMGUIContainer (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:692)
UnityEngine.Experimental.UIElements.EventDispatcher.PropagateToIMGUIContainer (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:704)
UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:650)
UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

Expected Result:
no errors

Occurring with:
2018.4.6f1

TextMeshPro Package Version:
1.4.1

Working with TMP Package:
1.3.0

Environment:
Only on windows

Please try the same steps but first import the TMP Essential Resources. Then create the TMP Drop Down.

Thanks for the prompt response - I just tried your suggestion and the same error behaviour occurs

Just created a new project in Unity 2018.4.6 and made sure it is using TextMesh Pro 1.4.1.

Imported the TMP Essential Resources and then created a TMP Drop Down and everything worked as expected in and out of Play mode.

Close Unity and then see if deleting the global package cache for TextMesh Pro resolves the issue. On Windows, the global package cache is located in "...\AppData\Local\Unity Cache\cache". Individual packages are in the packages sub folder. When testing, I typically delete the whole cache but you can delete just the TMP packages.

I have had a previous report of this but it was resolved by importing the TMP Essential Resources first and before creating a TMP Drop Down.

1 Like

closed unity, cleared out the whole cache, created a new project as per above - still the behaviour is the same unfortunately. Thanks for the fast response with the suggestions

Can you submit a bug report with the project the produces the errors. Since I cannot reproduce the issue on my end, this will enable me to figure out why this occurs on your end.

Please provide me with the Case # as soon as you have it.

Case 1176796

Just looked at the provided project and no errors when selecting / using the Drop Down before / during or after entering / leaving Playmode in the Scene Hierarchy as seen in the image below

4862261--468203--upload_2019-8-15_19-24-5.jpg

Given the provided project behaved as expected, it rules out something specific to the project thus pointing back to the package cache or something local.

Please try again the following steps. Sorry.

(1) Close Unity.
(2) Delete the Global package cache folder located in “…\AppData\Local\Unity Cache\cache”
(3) Using the same project you provided in this case, delete the Library folder / Logs and Temp folders.
(4) Also delete the TextMesh Pro folder inside Assets. This should leave you with an empty project.
(5) Open Unity. The packages will be downloaded and should be correct in the event that was an issue in the Global cache.
(6) Once Unity has loaded, Import the TMP Essential Resources.
(7) Create a Drop Down and see if the issue shows up again.

Hi I found the root Cause
By Mistake Visualise was Disabled for drop down
As soon as it is enabled issue was gone

I’m bumping this thread to say I encountered something similar in Version 2.0.1.
I had navigation visualization on when I deleted a TMP_Dropdown that wasn’t working, and when I created a new one, the MissingReferenceException popped up. Once I turned off the visualize mode, the error went away.
The visualization seems to be looking for the deleted TMP_Dropdown, as it also occurs on a toggle that navigated to the old TMP_Dropdown.

2 Likes

I was having the same issue with TMP_Dropdown, in my case the issue was happening because I'm using the "Enter Play Mode" options.
This bug was fixed in a recent preview version of TMP, so I updated it to v2.1.0-preview5. Now, the errors don't happen anymore. :)

From TMP's changelog:
Fixed potential Null Reference Exception with the TMP DropDown that could occur when using the experimental Editor "Enter Play Mode" feature. Case #1207915

So we’ve been having this issue as well.
After digging around a bit in the TMP_Dropdown code I have discorvered that TMP_Dropdown overrides Selectables OnDisable, without having a base.OnDisable call in it.
This leads to the dropdown never being removed from the internal unity array of active selectables (that it uses to update and visualise navigation) and that is problematic.
So just add a base.OnDisable() call to the beginning of OnDisable in TMP_Dropdown, at least that did it for us.

1 Like

The above fix was done in some prior release of TMP but that is the issue affecting sub objects which can occur when using the drop down when a fallback ends up being used. The solution is essentially the same as referenced here which is to call base.OnDisable() in the TMP_SubMeshUI.cs script as per this post .

I’m sorry but I don’t think I understood this at all.
TMP_SubMeshUI is not a selectable as far as I can see so I don’t understand how that issue overlaps with this?
Are you saying that the base.OnDisable call was removed from TMP_Dropdown to prevent the TMP_SubmeshUI from causing issues, or what do you mean?

1 Like

In a previous version of the TMP package, there was an issue related to not calling base.OnDisable() on the DropDown itself. This was fixed in a subsequent release of the TMP package.

In the latest release of the TMP package (version 1.5.0-preview.5), when a TMP DropDown ends up using a fallback font asset which ends up creating a sub mesh object, the CanvasRenderer of this sub mesh object is added to a list tracked by the UI system. Now since base.OnDisable() is not called on this sub mesh object when the TMP DropDown is disabled, we get several errors related to the Raycaster and this CanvasRenderer having been destroyed, etc… Ie. base.OnDisable() needs to be call by the sub mesh object.

This will be resolved in the next package release which will be preview 6.

1 Like

Preview 7 of the latest version of TMP is now available. I ended up having to skip Preview 6 due to a publishing issue which required I scrap Preview 6 so Preview 7 is it :slight_smile:

I’ve had success with this method and it worked for a while but now something keeps changing TMP_Dropdown.cs back, deleting base.OnDisable(). It’s happened twice in as many days. I don’t think TextMeshPro has updated. Any ideas why this might happen?

Please test with Preview 14 of the TMP package and let me know if you still run into this issue.

What version of Unity are you using?

2019

I’ll try that. I’m using Unity 2012.3.12.f1.

If anyone else encounters this problem, I can confirm that it doesn’t occur in preview 14.