2D Toolkit Forum
2D Toolkit => Support => Topic started by: dotbunny on June 09, 2012, 02:37:41 pm
-
After the wonderful support I got via email, I thought I would post this question publicly as others may find the 'hopeful' answer useful.
I'm utilizing the PoolManager middleware (Pathologic Games) to facilitate having many reusable animated sprites. It seems that any animated sprite that is used within this system does not animated correctly.
I've watched the actual tk2dAnimatedSprite script closely, it is indicating that it is playing, it is not paused (or globally paused), the spriteID changes, as does the previous ID ... however the actual rendered sprite does not change.
I have verified that SetFrameInternal is being called as well.
Is there any other suggested points I should be looking at ?
The object pool system simply does a SetActiveRecursive type thing ....
Thoughts?
-
Small update,
I've verified that UpdateVerticesImpl is being called and the meshes UV's are being adjusted; I don't really know where to go from there as thats the actual swapping point.
-
Is the mesh pointer valid at that point?
-
It's still pointing to "Instance" :)
-
Ok. I'm rewriting the mesh handling code now, so anything I suggest here will be irrelevant in the next release. Are you OK to wait a bit?
-
Heh :( not really.
Deliverable this weekend + 3 other games using the same tech getting put out in the next month.
Any suggestions would be much appreciated ... or hell I'll test anything :D
-
Actually I've got one for you. Can you check if mesh == GetComponent<MeshFilter>().sharedMesh?
My guess is they are different. And if they are, we can try to work out how they became different.
Also get in touch by mail - I check that a lot more frequently.
-
Any update about this issue?
-
We worked out in the end that it wasn't poolmanager but what DotBunny was doing to the object...
Basically he was calling GetComponent<MeshFilter>().mesh.bounds.size, but calling .mesh copies the mesh and creates a copy - 2D Toolkit was still attached to the original mesh and was modifying that one.