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.
Edit: the below is wrong, as Eric5h5 corrects me below, Update() does fire.
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?
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).