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 SetCurve lose Animator data?

Discussion in 'Animation' started by JamesKaret, Jan 8, 2021.

  1. JamesKaret

    JamesKaret

    Joined:
    May 18, 2014
    Posts:
    5
    I am not sure it's a bug or not. Maybe I'm doing something wrong here.

    I am working on Animation Editing with script on Edit mode.
    Whenever I use AnimationClip.SetCurve or AnimationUtility.SetEditorCurve functions the animator that contains target animationClip lose its data. not null but lose everything.

    capture.jpg

    Am I doing wrong or is it a script bug?

    ("animator" contains "targetClip" and "targetComponent" is the script that I created via another code. "generatedCurve" is ordinary AnimationCurve with KeyFrames)