MissingReferenceException: The object of type ‘Material’ 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.
UnityEngine.Object.get_name () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:194)
TMPro.TMP_SubMeshUI.AddSubTextObject (TMPro.TextMeshProUGUI textComponent, TMPro.MaterialReference materialReference) (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_SubMeshUI.cs:215)
I’m Using Unity 2020.3.11f1, with the latest TextMesh Pro (3.0.6) and the TMP Essential Resources imported.
If it matters, I’m doing additive scene loading, and each scene has it’s own Screen Space - Camera canvas. When a scene is additively loaded, I disable the scene camera and set the Canvas’s camera to the main scene camera.
The errors occur only when exiting the game in Play mode in the editor - I haven’t tried a build.
the thing is I don’t have any script that is doing anything when I stop play mode except maybe a Pointer Down event listener on a UI button.
Any ideas on what I can do the fix this, or why it is happening?