Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Timeline animation keep pose when removed from timeline

Discussion in 'Timeline' started by Censureret, Aug 9, 2020.

  1. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    So I have created a timeline for each "Execution" I have. Then I have a script that inserts the correct values into the timeline and plays it.

    This works perfectly however there is an issue. When I reset the timeline (removing all the values) from it the character who was "affected" by the timeline returns to an idle/standard pose.

    I have attempted to use the "hold" method on the PlayableDirector however this doesn't work in this case because I remove the NPC from the timeline entirely.

    has anyone attempted to do the same as I have and found a good way to ensure that the NPC stays in pose even after he is removed from the timeline asset?
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Is there an animator controller attached? If so that's probably what is changing the pose after the character is disconnected. Otherwise you can try calling Animator.WriteDefaultValues before disconnecting the animator from the timeline.
     
  3. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    There is an animator controller to the character is it possible to disable it and keep the pose?
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    It should be. You can try disabling the animator component when you detach the timeline.