I have an animated model which is initially outside the camera field of view (i.e. not visible). When the level starts the animation is supposed to bring the object into the field of view. But, alas, the animation does not seem to play if the object is not visible.
So, is there an intended way to cope with this?
I unchecked the "Animate Only if Visible" property of the animation without obtaining any difference in behavior.
There seems to be a post in the forums which mentions the issue: http://forum.unity3d.com/viewtopic.php?t=30401&start=0&postdays=0&postorder=asc&highlight=animate+visible
Someone explains a workaround that involves adding a camera, which does not work for me. Another workaround is to set a property "Update When Offscreen" of skinned mesh renderers, which is rather inconvenient when the object has a lot of skinned mesh renderers, and does not say what to do in the case of having a non-skinned mesh renderer.
Update: I'm currently using the following script attached to the model in order to avoid setting by hand the property "Update When Offscreen" in the many nodes that need it.
class UpdateWhenOffscreen (MonoBehaviour):
def Start ():
for mr as SkinnedMeshRenderer in GetComponentsInChildren(SkinnedMeshRenderer):
mr.updateWhenOffscreen = true