- Home /
Batchmode and animation
When running a Windows build in batch mode, do animations not get updated, even if updateWhenOffscreen is set to true?
I am exporting to an OBJ, and when I launch it in batchmode, the animation does not get set, but it does when launched normally. Why? I tried setting updateWhenOffscreen, but it doesn't have any effect...
Answer by Paulius-Liekis · Oct 15, 2012 at 01:39 PM
They should be. Although I haven't tried.
updateWhenOffscreen is deprecated, how old is your Unity? How are you checking that they are not updated?
It isn't updating. I am exporting skinned meshes to an OBJ. It works in the editor (with a weird transform problem), and it works if I don't add the "-batchmode" command line argument. I would much rather it not open a window if it doesn't have to, but the skinned mesh doesn't get updated.
Where does it say updateWhenOffscreen is deprecated? Unity still uses it in the Editor, so I don't think it is deprecated... Also, deprecated means still in Unity, but outdated, which means my version could be the most up to date (it is, ignoring the 4 beta), and I could still be using it, so your question of what version I am using doesn't make sense... If it is deprecated, what is the new thing that replaced it??
Sorry if I came out as rude, I just don't think this answer is helpful at all...
np. I confused it with http://docs.unity3d.com/Documentation/ScriptReference/Animation-cullingType.html, you need to set that to AnimationCullingType.AlwaysAnimate. Let me know if that helps.
That is strange. Setting the animation culling type to AlwaysAnimate causes it to not animate at all, even in the editor... That is really weird.
Is gameObject.animation.cullingType = AnimationCullingType.AlwaysAnimate the right animation culling I am suppose to be setting?
Are you setting that from code? I found a bug (about 3 months) where setting it from code to AlwaysAnimate will stop animating at all. I fixed that bug, but I believe the fix went into 4.0 (not 3.5). Try setting it from Editor UI and see if that helps. I can't remember if there is another workaround...