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

Question Is it possible to set clip on AnimationClipPlayable?

Discussion in 'Animation' started by qiqiqi, Oct 19, 2022.

  1. qiqiqi

    qiqiqi

    Joined:
    Nov 3, 2015
    Posts:
    17
    There's only a GetAnimationClip method but no Setter(unity 2020.3). As far as I know the only way to set clip is when creating a new AnimationClipPlayable. However when learning the Animator's graph, I found that the playable just reset its clip rather than recreate the playable
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,555
    I don't think it's possible without destroying and recreating the Playable. My theory is that it's an internal feature which Animator Controllers use in a specific way that's known to be safe but which they didn't want to expose publicly because it might not be safe to use in all cases.
     
    qiqiqi likes this.