[Unity]解决Animator.GotoState: State could not be found; Invalid Layer Index ‘-1’ 一例

2020/08 09 09:08

起初怀疑是StateName不对,但是看起来都是一样的,都是Move

后面重建了一个State就好了

对比2个Control文件后发现

AnimatorState:
  m_Name: ' Move'

AnimatorState:
  m_Name: Move

上面这个是错的,多加了一个空格!!!