Hello Guest

Author Topic: 2d toolkit 1.8 on unity 4  (Read 5845 times)

vambier

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
2d toolkit 1.8 on unity 4
« 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?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2d toolkit 1.8 on unity 4
« Reply #1 on: November 30, 2012, 04:30:47 pm »
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.
« Last Edit: November 30, 2012, 04:41:26 pm by unikron »

vambier

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: 2d toolkit 1.8 on unity 4
« Reply #2 on: January 20, 2013, 02:16:09 pm »
I've been out for a while, I mailed you about this, could you send me a patch for this? Thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2d toolkit 1.8 on unity 4
« Reply #3 on: January 21, 2013, 02:47:24 pm »
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.

vambier

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: 2d toolkit 1.8 on unity 4
« Reply #4 on: January 22, 2013, 09:20:49 am »
Thanks for your mail, is 1.90 backwards compatible? If so I think I can wait a couple more days for that one:-)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2d toolkit 1.8 on unity 4
« Reply #5 on: January 22, 2013, 09:22:51 am »
Yup 1.90 works fine. That wasn't a Unity4 specific issue, it was a bug in 1.80 :)