level 2
突破手▫夏洛克
楼主

是这样的,我想做个连招派生系统,一开始以为GetBehaviour会返回当前状态上挂的脚本,就建了个状态机行为脚本用来存当前状态的招式数据,然后在玩家PlayerController脚本攻击的时候 调用当前状态的招式数据,就像这样:
但是发现使用任何招式都只会返回一个状态(sonKick)上挂的状态机脚本,这个思路用不了API文档上Animator.GetBehaviour()的描述是
Return the first StateMachineBehaviour that match type T or derived from T. Return null if none are found.
返回匹配类型T或派生自T的首个状态机行为,如果没有找到返回null。
中文翻译的是个纯纯的病句也就罢了,写的也是语焉不详说了当没说