2D Toolkit Forum

2D Toolkit => Support => Topic started by: lighthousefiled on August 26, 2013, 09:19:29 pm

Title: upgrade from Unity 3.5 to 4.2
Post by: lighthousefiled on August 26, 2013, 09:19:29 pm
Hi,

We just upgraded our unity project from 3.5 to 4.2.
I'm getting the following tk2dSpriteCollectionBuilder  errors:

InvalidCastException: Cannot cast from source type to destination type.
tk2dSpriteCollectionBuilder.SetUpTargetTexture (.tk2dSpriteCollection gen, UnityEngine.Texture2D tex) (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionBuilder.cs:1158)
tk2dSpriteCollectionBuilder.Rebuild (.tk2dSpriteCollection gen) (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionBuilder.cs:913)
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)
...

What can I do to resolve this?


Title: Re: upgrade from Unity 3.5 to 4.2
Post by: unikronsoftware on August 27, 2013, 10:07:49 am
What version of 2D Toolkit are you using? If you're on an old version which was released before 4.0 was released, then likelihood is it might not be compatible with 4.x....

I could probably advise the least intrusive version to upgrade to if you tell me what version you're on.