- Home /
Animation.Sample not updating animation transforms?
I'm trying to cache out the frames of a model's animation to a sprite atlas. This is being done in a disabled/offscreen camera. I can set the time once and it will immediately update (regardless of whether I call Animation.Sample() or not). If I do it a second time during the same frame, it will fail to update the position. Once again, calling Animation.Sample does absolutely nothing.
Am I missing something here? It seems like Animation.Sample is what I need, but it doesn't seem to affect anything. Also, why is it updating the animation the first time I set AnimationState.time (without calling Sample)? All of this happens before the animation update stage...
Hi, seven years later i have this problem, i am trying to make a sprite atlas at runtime in a function. I make a coroutine to do this and when i use Animation.Sample and make the render, the renders are alwayes the same, but if a put yield return WaitForEndOfFrame, then the animation is updated and work but it takes 2x time. I need to make this the fastest it can. Have you found a solution?
Answer by Paulius-Liekis · Mar 21, 2011 at 08:54 AM
Hm...sounds weird. I can't remember seeing any problems like this with Animation.Sample. Can you post your mini-project somewhere?