2D Toolkit Forum
2D Toolkit => Support => Topic started by: vambier on November 29, 2012, 01:01:32 pm
-
I was using unity 3.4 to build our game but I now switched over to unity 4 and installed the 2dtoolkit 1.8 final + patch 2 via the asset store.
But every time an asset changes in my project the "rebuilding index" box hangs. In the console I get the following message :
NullReferenceException: Object reference not set to an instance of an object
tk2dIndex.AddOrUpdateFont (.tk2dFont font) (at Assets/TK2DROOT/tk2d/Editor/tk2dIndex.cs:201)
tk2dEditorUtility.CreateIndex () (at Assets/TK2DROOT/tk2d/Editor/tk2dEditorUtility.cs:197)
tk2dEditorUtility.GetOrCreateIndex () (at Assets/TK2DROOT/tk2d/Editor/tk2dEditorUtility.cs:114)
tk2dSpriteCollectionBuilder.Rebuild (.tk2dSpriteCollection gen) (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionBuilder.cs:1102)
tk2dSpriteCollectionBuilder.RebuildOutOfDate (System.String[] changedPaths) (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionBuilder.cs:142)
tk2dSpriteCollectionTextureWatcher.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionTextureWatcher.cs:24)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets)
UnityEditor.DockArea:OnGUI()
Any ideas what could cause this?
-
Just had a look at this. Yes I can think of something which could cause it. Drop me an email and I'll get you a patch.
Looks like you may have a font which isn't set up somewhere in your project. Easier to skip over these than to manually find them in the project.
-
I've been out for a while, I mailed you about this, could you send me a patch for this? Thanks!
-
Just replied to your email. This issue is fixed in 1.90. I hope to release the final version in the next day or two.
-
Thanks for your mail, is 1.90 backwards compatible? If so I think I can wait a couple more days for that one:-)
-
Yup 1.90 works fine. That wasn't a Unity4 specific issue, it was a bug in 1.80 :)