Hi,大家好,我又来麻烦大家了,我的项目节点树如下:

我想达到的目标是:在运行时给AnimationPlayer再添加一个method轨道,在这个method轨道中,播放到1秒时,触发Node.testTrigger这个方法。
AnimationPlayer在编辑器中做了一个叫做intro的动画,动画包含一个属性轨道

我尝试写的代码如下

永远是报错:
E 0:00:00:0493 node.tscn::GDScript_2glk1:7 @ _enter_tree(): Condition "p_key.get_type() != Variant::DICTIONARY" is true. Returning: -1
我想找如何在运行时添加method轨道的写法,但是官方文档只有在运行时添加属性轨道的写法


我想达到的目标是:在运行时给AnimationPlayer再添加一个method轨道,在这个method轨道中,播放到1秒时,触发Node.testTrigger这个方法。
AnimationPlayer在编辑器中做了一个叫做intro的动画,动画包含一个属性轨道

我尝试写的代码如下

永远是报错:
E 0:00:00:0493 node.tscn::GDScript_2glk1:7 @ _enter_tree(): Condition "p_key.get_type() != Variant::DICTIONARY" is true. Returning: -1
我想找如何在运行时添加method轨道的写法,但是官方文档只有在运行时添加属性轨道的写法



