- Home /
Animator 'Always Animate' & skinning 'Update when offscreen' does not work
Hi,
I’ve got a skinned mesh whose bones are animated by an animator which has the culling mode set to "Always Animate". The skinned mesh also has the "Update when offscreen" option set. This skinned mesh is on a layer which is excluded from the main camera, and only rendered by DrawRenderer() in command buffers which I construct manually.
When I run this, the skinning does not update. Only when I add a dummy camera which "sees" the skinned meshes they update (if I rotate it away, they do not). So regardless of the above mentioned settings, frustrum culling still seems to be occurring and preventing the skinning.
How can I force the skinned mesh to update without having the camera render them?
Any hacks involving an extra camera to trigger the skinning without actually rendering it, or manually triggering the skinning somehow, or involving shader replacement, would also be acceptable. Whatever works.
You've probably already checked this, but when you enter Play mode, the 'Update When Offscreen' setting is still checked on the model, right? Just making sure you don't have a script somewhere that's setting it accidentally. If it's not that, I dunno what could cause that, I'm not turning up anything useful in research.
Yes, I’ve confirmed that the settings are also correct in play mode. It looks like there is a skinning optimisation which ignores that "Update when offscreen" checkbox.
I’ve found a workaround, when that aforementioned dummy camera is present, by setting skinned mesh’s materials count to 0 I can make it skin without actually causing any draw calls. Then in the DrawRenderer() calls I manually pass in the desired material. This is annoying but at least it works. Further suggestions are appreciated.
@GrauwVG did you report this as a bug? Glad you found this hack. I'm doing the exact same thing to avoid extra cameras/culling so it's a bit of a bummer that we have to do this.
I'm creating a repo to send to Unity, but in the mean time, thanks for the workaround!
Good to hear! I don’t think I submitted anything to Unity apart from this post.
Your answer
![](https://koobas.hobune.stream/wayback/20220612112136im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Transfer blendshapes between objects 1 Answer
Scene rendering within another scene 0 Answers
How to export turbosmoothed animated model to Unity3d? 0 Answers
Skinning editor not updated with reslice on PSB ,Skinning Editor not updating after reslice 2 Answers
Update Mesh immediately for rendering While changing blendshape 1 Answer