在播放动画时,内存中的重复材质大量增加
hjx1994 I see, thank you for trying the 4.2 editor and runtime! In order to identify the cause of the issue, could you please send us the minimal Spine project that reproduces the issue via email?: contact@esotericsoftware.com
Please include the URL of this forum thread in the email so we know the context. Then we can take a look at what's wrong.
@hjx1994 Thanks for reporting and sorry for the troubles! This was indeed a bug where mask materials were unnecessarily re-created. This has now been fixed on the 4.2 branch.
A new spine-unity 4.2 unitypackage is available here as usual:
https://esotericsoftware.com/spine-unity-download
Please let us know if this resolves the issues on your end as well.
Issue ticket for later reference:
EsotericSoftware/spine-runtimes2848
@hjx1994 Very sorry for the troubles and thanks for reporting! Unfortunately the mask handling structures in the 4.2 spine-unity runtime is suboptimal, and fixing it one way would introduce different memory leaks, and also risking breaking existing projects. As a result I've reverted the last commit, sorry to say.
The good news is that we have already solved this problem via a better mask architecture already in an internal dev branch, which will be released in the current beta branch alongside with threading implementation as soon as the final cleanup is done. Unfortunately it will take a bit of time still, as porting of the 4.3-beta editor changes is yet to be completed.