Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Strange Artefacts of Editor and Character Animation

Discussion in 'Animation' started by Ecliptec_Mobile, Jan 19, 2023.

  1. Ecliptec_Mobile


    Dec 17, 2017
    I have a setup where a body animation is supposed to player on an avatar via Animator.SetTrigger(). On the whole, this seems to behave as expected.

    There are times when, after moving the character via a Kinematic Controller whose velocity is used to control the "run" animation, the body animation doesn't play out fully and seems to start but suddenly stop. This occurs upon repeated presses of a button on the UI. One thing I do note, is that whenever I change the focus of the Editor e.g. switch to Visual Studio (to debug this!), and back to the Editor the animation actually plays, and correctly, upon subsequent presses of the button.

    Then, when I move my character again, the same thing happens and I change focus and it's fine again. I note that this issue also happens on the device with a build.

    This seems like very strange behaviour to me and I can't think what might be happening, or even how to debug it in Visual Studio - as described above. The code for starting the body anim is in the screen below.
    Screenshot 2023-01-19 150243.png Screenshot 2023-01-19 150306.png