Hello there,
Apologies if this has already been posted on the forum before.
In short, I believe there is a memory leak when using attachment.GetRemappedClone().
Information about our project:
- For our project we are making use of Spine to allow players to customize characters in Unity on both Android and iOS.
- We are using a sprite sheet generated with Texture Packer to load sprites into attachments to allow for customizing each attachment by the player without the need for every possibility to be a skin setup in Spine.
- We are on the latest 3.8 version of Spine for Unity.
- The game kept freezing after a somewhat fixed amount of time regardless of mobile testing device
Upon further investigating with the Unity profiler it appeared that textures would go up every time we changed any attachment by using GetRemappedClone.
In the end we fixed this by calling Resources.UnloadUnusedAssets() and AtlasUtilities.ClearCache() which seems to fix the memory leak.
I am uncertain whether this is truly caused by GetRemappedClone() or if this is caused by us using a Sprite sheet not from Spine/Unity to remap.
Let me know if I can provide more information that might be useful
Greetings,
Steven