A looping skeletal mesh animation from a FBX file freezes at random intervals and random positions in Unity. It’s not even related to the animation frames, because the animation loops perfectly in Blender, UE and even in Unity, the problem are the random stutters/freezes.
You can see even the playback in the Director freezing randomly:
Look how it just freezes for a second then continues (this is a random position in the animation, not at the looping part):
Anyone has gone through something similar? Any idea of what this could be?
It could be my computer, but it’s a very beefy computer (as a comparison I run big UE5 projects in max Epic settings w/out frame drops).
UPDATE: this is happening to all animations I import - Unity randomly freezes/stutters for a few frames when playing animations. I already updated the GPU drivers (using RTX 3080Ti) and I’m facing the same with 2021.3.9f1 and 2022.2.0b7.
UPDATE 2: Only in the editor. For exported builds there are no stutters and the animations loop perfectly.
It’s good, but at the same time very annoying and distracting, since it makes it harder to develop and test the game, giving false impressions that there’s something wrong all the time.
UPDATE 3: It’s actually the WHOLE editor stuttering every 3 seconds or so - even in blank projects! And I found out this is an issue that happens since the beginning of Unity.
EDIT: OOPS. Just read your last post… gotta learn to read the whole thread, hahaha.
I know the feeling, here are my recommendations:
Open up the profiler, see what goes on when it skips.
Check window’s task manager to see if some process monopolizing the cpu/gpu.
Try disabling compression when importing animations
Make sure you don’t have some malware running that could interfere.
The editor can get bloated. Do you have a ton of assets and editor tools in your project? Some tools are poorly coded and can mess up the editor’s performance.
Duplicate your project, remove EVERYTHING (assets, tools, comment out code) you don’t need for that single feature and retest.