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.

HOW TO EDIT KEYFRAMES OF AN ANIMATION BUT SCRIPTABLE WAY C#

Discussion in 'Animation' started by yuyu1584, Aug 25, 2022.

  1. yuyu1584

    yuyu1584

    Joined:
    Jul 31, 2020
    Posts:
    1
    We are encountering a problem developing a tool that it suposed to edit custom keyframes of an animation, but we found out that there is no information about this neither on unity forums or unity documentation. Is there really a way to do it?
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,026
    You can edit keyframes, yes, though afaik only at edit time - not during gameplay.

    Is this in imported .fbx files, or in Animation files built in Unity?

    To edit Animations, you use the AnimationUtility class. If they're in an fbx file, you have to use the ModelImporter to get the data and modify it.