unity, 删除animationEvent

时间:2015-12-24 23:31:02   收藏:0   阅读:2016

当初给Player的一个animation加了个animationEvent,后来与之关联的响应函数删除了,于是导致报错:

‘Player’ AnimationEvent ‘idleHalfEvent’ has no receiver! Are you missing a component?

接下来是想把这个animationEvent也删掉。

发现如果从下面animation窗口中删除:

技术分享

则等下次重新打开工程,删除的animationEvent又会出来。所以这种删除方法是不行的。

正确的删除方法是进入到Animator视图中,点击添加了那个animationEvent的状态机节点(我这里是idle这个节点),则右边会打开Player Import Settings的Inspector面板,clips选中idle,然后点开下面的Events时间轴,可以看到其上添加的animationEvent,在这里将其删除,则下次再打开工程它就不会回来了。

技术分享

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!