Skinned mesh animation not updating sometimes!

Hi there,

I’m having this strange issue, it seems that skinned meshes (with “update when offscreen” turned ON) loose their animation in the scene if they are hidden, and then unhidden.
I can fix the problem in the editor by toggling “update when offscreen” off then on, but that didn’t work when I tried to put it into a script as a hacky fix.

Any ideas?
Thanks
Pete

Okay I made a quick web player example -
http://www.naffupdate.com/forumfiles/Skinning%20issue.html
If anyone has a sec to check it out, turn each of the spheres off and on to see the problem.

Thanks
Pete

(Hey just on a side note, is it possible to embed a unity webplayer into a post?)

Edit: the below is wrong, as Eric5h5 corrects me below, Update() does fire. :stuck_out_tongue:

If you’re putting into a script, Update() will not fire when “Update When Offscreen” is disabled. So you’ll need to toggle that prior to having the object go offscreen, if that’s what you are trying to accomplish.

Update() always fires every frame, as long as the script is enabled. What “Update When Offscreen” does is make the skinned mesh renderer always update regardless of whether it’s frustum culled or not.

They both toggle off and on the same way; what are they supposed to do?

–Eric

That’s weird, for me the left one stops animating when it has been toggled back on. That’s the issue I’m having.

I’m using the 3.2 webplayer, so maybe it was fixed.

–Eric

Thats exciting! This was a bit of a show stopper for me as I’m unhiding skinned meshes as part of my character customisation.

Ack, you’re right. Sorry for the misinformation. I was confusing this and AnimationEvents (which of course, do not fire when offscreen animations are stopped).