Search Unity

Rebind animated variable to correct target

Discussion in 'Animation' started by luispedrofonseca, Feb 13, 2014.

  1. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    941
    So, I'm working on a 2d animated character. I'm using Puppet2D plugin (awesome, BTW) and when I create an animation for my character if later I rename (or move in the hierarchy) the gameObject that I previously animated, the animation reference is lost:

    https://www.dropbox.com/s/8osbvcemmzf0oqb/Screenshot 2014-02-13 11.16.17.png
    $Screenshot 2014-02-13 11.16.17.png

    This is OK and obviously makes sense. What it doesn't though is not allowing you to retarget it somehow! Does anybody know if it's possible to do it? I found a script online but it's cumbersome and messes up the rest of the animation.
     
    Last edited: Feb 13, 2014
  2. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    941
  3. coshea

    coshea

    Joined:
    Dec 20, 2012
    Posts:
    319
    Yes I also have this problem, any suggestions welcome. Thanks.
     
  4. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    941
    This is the best I've found: http://pastebin.com/S0fyDmPN

    However, it will mess up your animations' rotations by adding keyframes on every frame.
     
  5. michael-ltn

    michael-ltn

    Joined:
    Feb 21, 2013
    Posts:
    4
    Old thread, I know, but I just ran into this issue and for what it's worth, you can just open up the .anim file in a text editor and just use find & replace. Not sure if this will work while Unity is running; I closed it to be safe.
     
    Evolutis42 likes this.