Fix sprite

1. add getMeshCount
2. fix bug that did not create attached sprite from cache