Thanks for the additional info.
parth16parikh wrote
So for 4 images which are attached to Mesh Attachment needs following requirement,
- Image loaded from the persistent data path has to match atlas.txt size.
- After loading texture, Sprite which is created runtime needs to be Full Rect Mesh Type.
Admittedly, this current behaviour is rather unintuitive. We will have a look if we can provide either an additional method parameter or change default behaviour in spine-unity 4.0 and newer versions to compensate whitespace stripping on MeshAttachments
as well.
parth16parikh wrote
I can send you this project which is working completely if you want.
Thanks for offering, currently we don't need it. We will let you know when we require a test project if we cannot reproduce the described behaviour.
parth16parikh wrote
I wanted to ask performance impact of changing and repacking images runtime. How heavy it is? Once it is done, does it affect animation?
Repacking skins is a very costly operation performance wise, as uploading a texture to the GPU is an expensive operation. If possible, you should always perform any repacking at non-crucial times (e.g. when already loading a level, or when inside a character customization menu). It will however save you some drawcalls, so if can move it to non-crucial moments of gameplay, it's most likely well worth the cost. We cannot provide any precise values, as this heavily depends on your scene and character setup and on the target platform. If your character setup does not require many drawcalls before repacking, you might as well be better off not repacking the skins at all.
Harald wroteAdmittedly, this current behaviour is rather unintuitive. We will have a look if we can provide either an additional method parameter or change default behaviour in spine-unity 4.0 and newer versions to compensate whitespace stripping on MeshAttachments as well.
I just had a look at your previous reproduction project again, the problem here is that the .atlas.txt
file states size 263x263 for both size and original size ("orig"
in the file), not stating the proper original size as you said is 231x207. As requested before, could you please now send us your problematic Spine project (not the Unity project) where the actual image size of the green foot is 231x207 and in the output atlas it becomes 263x263?