Search Unity

How can I use an editor script to reassign Animator references automatically after updating a mesh?

Discussion in 'Animation' started by KiddUniverse, Feb 13, 2019.

  1. KiddUniverse

    KiddUniverse

    Joined:
    Oct 13, 2016
    Posts:
    115
    Everytime I update my mesh, and reimport my FBX, all of the references to my animations clips need to be reassigned in the animator. How can I assign them automatically in an editor script?
     
  2. KiddUniverse

    KiddUniverse

    Joined:
    Oct 13, 2016
    Posts:
    115
    i'm aware that you can just overwrite your file outside of Unity, but the meta file for the FBX has some discrepancies. For some reason it doesn't work with blend trees very well unless you literally "Import" the file rather than just overwriting it. The interpolation between frames doesn't update and it just acts oddly. Does anyone know of the methods to access the clips attached to the FBX by string, and the methods to access state names by string?