Problem with "Update when Invisible"
You can find the exact version either as the name of the unitypackage or in Assets/Spine/version.txt
, or alternatively in the Unity Package Manager, if it has been installed this way. If you're really seeing version 4.1.7 in the Unity Package Manager, please have a try updating the package as 4.1.7 is very old, the latest 4.1 spine-unity runtime version is 4.1.41
.
I followed your indications and found this:
Also, checked the problem and why it was happening only to a few objects and found out the issue appears with separator enabled objects. Does this mean something to you?
@Yimec Thanks for the update, IIRC version 2023-08-14 is recent enough so you're not missing any bugfixes regarding this topic.
Also, checked the problem and why it was happening only to a few objects and found out the issue appears with separator enabled objects. Does this mean something to you?
This sounds interesting, it might likely be that the SkeletonRenderer
no longer receives OnBecameVisible
events since the MeshRenderer
at the same GameObject is then disabled. Still it would be much appreciated if you could send us a minimal Unity project, as it might be depending on the order and timing of activating the SkeletonRenderSeparator
and similar events.
@Yimec Thanks for sending the reproduction package.
In general please send the Unity projects as zip packages as requested (without unnecessary dirs like e.g. the library dir) and not as unitypackage, since this involves more steps for us to have a clean separate reproduction project.
We'll get back to you here on the forum once we've figured out what's going wrong.
@Yimec We have just pushed a safe bugfix on both the 4.1 and 4.2 branches. Now whenever a SkeletonRenderSeparator
is active, the SkeletonRenderer
counts as visible and no longer disables the updates upon seemingly becoming invisible. This should fix your issue, however no longer provides the benefits of disabling updates when truly invisible and off-screen.
We are working on an improved bugfix as well which tracks visibility of each SkeletonPartsRenderer
. This fix however will be released on the 4.2 branch only due to the necessary changes.
New 4.1 and 4.2 spine-unity unitypackages are available for download here as usual:
https://esotericsoftware.com/spine-unity-download
Please let us know whether this fixes the issues on your end as well. Thanks again for reporting!
Issue ticket for later reference:
EsotericSoftware/spine-runtimes2519
- 已编辑
@Yimec We have now also pushed an improved bugfix to the 4.2 branch via this commit. This should now provide proper handling of disabling updates when all SkeletonPartsRenderers
are invisible and re-enable updates when at least one SkeletonPartsRenderer
is visible.
If you want to use this commit in your 4.1 project, you would need to manually integrate the commit's changes.
An updated 4.2 spine-unity unitypackage is also available for download:
https://esotericsoftware.com/spine-unity-download
Harald I've updated my 4.1 installation with the latest version and now it works, however, trying to update this version with the 4.2 changes manually integrating the commit's changes you reference I found out that commit is already applyed in the 4.1 version, so, could it be another commit what I have to integrate?
At the moment, the spine objects are still animating out of frame when labeled as "Only Events" update (at least they do animate when vinsible), but the performance improvement is what we need to achieve.
Thank you very much for everything!
@Yimec Oops, sorry, I linked the wrong of the two commits. The correct 4.2-only commit to integrate in 4.1 would be this one:
EsotericSoftware/spine-runtimes77e859c
I will fix the links above.
Now that makes sense. I updated the runtime editor with the commit but I had no time to check if everything is working fine, when I'm available to test everything I'll let you know.
So far, thank you very much for everything, I have no words to explain how grateful I am with you all, as you always have time to help me.
No hurry regarding the testing.
Thanks very much for your kind words, much appreciated!