Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Discussion Animation Playback feature

Discussion in 'Animation' started by BorpaBoatski, Jan 12, 2024.

  1. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    54
    I'm making a recording playback feature and I'm having difficulty setting the recorded animation clip. Right now I'm saving the AnimatorStateInfo fullPathHash and normalizedTime. The idea is to use Animator.Play() to bring out the correct animation.

    Now the recording playback is only meant to playback the exact frame so the animation should be frozen in place when not scrubbing the recording. I could set the TimeScale to 0 to achieve this effect but for now I'm disabling the Animator component. However, the disabled Animator component seems to prevent any animation from playing so I'll have to think of an alternative to "setting the animation clip to specific frame and freezing".

    Another issue I'm having are the transitions. As I play the specific animation state, its transitions still work as normal so the clip would transition out of the needed state to the next due to the transition conditions. Is there a way to disable state transitions?
     
  2. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    54
    Alright I've thought of a solution for the transitions problem. I just created a similar animator controller but it doesn't have any transitions.