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.

Mechanim, changing one state changes another

Discussion in 'Animation' started by DDNA, Mar 17, 2017.

  1. DDNA

    DDNA

    Joined:
    Oct 15, 2013
    Posts:
    116
    I keep running into this problem where 2 states become intrinsically linked together.

    For example I have
    SubStateA->State->BlendTree->Motion
    and
    SubStateB->State->BlendTree->Motion

    So in the editor I drag a new clip onto the blendtree in SubStateA, and when I go back to SubStateB the motion on that blendtree has been changed as well and vice versa.

    I am assuming this is not expected behavior. Right now in my project I have a series of blendtrees that I can not change or unlink. I have filed this as a bug 891990
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,847
    Did you copy-and-paste the blendtrees?

    The animator allows you to copy and paste, but you should never do that, because it's hillariously broken. You will get reference copies instead of copies of the data, so what you're seeing now will happen.

    We had Unity crash a bunch because (I believe) the animator tried to follow a copy-pasted sub state machine into a different animator controller.

    Great that you submitted a bug report!
     
  3. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Indeed. Bug reports are very appreciated
    I just saw this in the bug list. I plan to look at it soon. This is the first time I hear about this happening in a Controller that was not generated using scripts.

    This often happens with script generated controllers, because everything in a Controller is an Asset (even though it's all hidden), so if you're not careful, you can end up referencing things left and right.
     
unityunity