Hello,
From many pictures on the disk, I’m creating a sprite sheet at runtime with Unity. The process works fine, I finished saving the big texture on the disk and a json file.
Then I load the png, the json and I create my sprites:
Sprite.Create(loaderTexture.texture,newRect(textureAsset.x,textureAsset.y,textureAsset.width,textureAsset.height),Vector2.zero,pixelsPerUnit,0,SpriteMeshType.FullRect));
I tried:
- from a 4096 x 4096 texture (16Mo) creating 50 sprites, 30 seconds.
- from the same texture compressed with pngquant (3Mo) creating 50 sprites, 10 seconds.
The WWW part for loading the texture doesn’t change anything, it is really related to the Sprite.Create API. What Unity does internally? How can I optimize on my side?