Hi,
I'm having an issue changing the tk2dSpriteCollection of a tk2dSprite at runtime.
The tk2dSpriteCollectionData object is in the Resources folder and loaded at runtime using Resources.Load (I have also tried dragging them into public variables in the inspector, but had the same results).
When I call the SetSprite function and pass the tk2dSpriteCollectionData object to it, the sprite correctly changes to the new collection. When this is done, however, other sprites in the scene (that are using completely different sprite collections) lose their material references. The material on these sprites changes to "Default-Diffuse (Instance)" instead of the "tk2dInternal$.Material_..." material. This only happens to some sprites; others in the scene that reference the same collection are fine. The affected sprites are not random, but they appear to have no connection. In addition, I receive numerous "Shader wants normals, but the mesh doesn't have them" errors in the log.
If I call ForceBuild on all sprites in the scene after changing the sprite collection the sprites seem to fix themselves, but I still get the "Shader wants normals" errors. This issue only occurs when changing the sprite collection of sprites at runtime, otherwise the scene works properly.
Not sure if this is relevant, but I am changing multiple sprite collections in the same frame.
Any assistance would be greatly appreciated.