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.

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)