https://forum.unity.com/threads/animator-locking-animated-value-even-when-current-state-has-no-curves-keys-for-that-value.440363/
以上链接并未解决问题,因为官方从12年到现在 都不觉得这是个问题。但是实际用的时候确实非常难受,clip中用到的属性,包括setactive ,enable, position等的修改 ,在其他地方都要用到。不被脚本修改 是不现实的。
当前的方案是:
- animator初始设置为 enable = false;
- 用于触发动作的位置 设置 animator = true;
- 给animaiton clip 添加相应的 behaviour ,(在animator 编辑器中) ,脚本中对 exit 函数进行修改,在退出的时候 将enable = false;用于关闭animator 使能。