Small fix and optimization when updating the mesh.

- Fixed an assert when showing/hiding a slot image.
- Some optimization to generate normals/tangents only when needed by the material (defined in the Sprite Collection)