2D Toolkit Forum
2D Toolkit => Support => Topic started by: hippocoder on February 13, 2014, 10:16:54 pm
-
NullReferenceException: Object reference not set to an instance of an object
tk2dTextMesh.NumTotalCharacters () (at Assets/TK2DROOT/tk2d/Code/Fonts/tk2dTextMesh.cs:462)
tk2dTextMeshEditor.OnInspectorGUI () (at Assets/TK2DROOT/tk2d/Editor/Fonts/tk2dTextMeshEditor.cs:330)
UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty)
UnityEditor.DockArea:OnGUI()
Floods whenever I select a textmesh. Any idea why?
-
Selecting the font to another font then back again in textmesh fixes the spam.
-
Does it just happen on the one text mesh, or all of them?
From that line it looks like you may have unicode chars in your font, and the dictionary is not initialised. Is the font from a sprite collection?
-
The font is just a standalone retro font from 1001fonts.com converted to an atlas. I am using the string "hello world", and it's a random problem... comes and goes. Seems to affect prefabbed ones more than others and changing the atlas collection for the font (I don't mix fonts with sprite atlases) appears to clear it up for a while.
What can I provide to help track it down?
-
If you can create a really simple repro project, that would be perfect. Any way to repro would really really help track this down otherwise we're gonna waste loads of time with diagnostics & debug stuff.