My animations are working perfectly fine in editor but when the game is built, the animations bug out significantly. Does anyone know what could be causing this issue? Example of the issue below
Sounds like you wrote a bug… and that means… time to start debugging!
First place I would check is the runtime logs (google for where they are), looking for exceptions or anything else untowards.
By debugging you can find out exactly what your program is doing so you can fix it.
Use the above techniques to get the information you need in order to reason about what the problem is.
You can also use Debug.Log(...); statements to find out if any of your code is even running. Don’t assume it is.
Once you understand what the problem is, you may begin to reason about a solution to the problem.
Remember with Unity the code is only a tiny fraction of the problem space. Everything asset- and scene- wise must also be set up correctly to match the associated code and its assumptions.
ALSO… regarding anything with Animations / Animators / Mechanim:
Only consider the code AFTER you have done this critical step:
Always start with the Animator state machine and prove it works in isolation, no code at all.