I tried to animate a CCFloat in a custom script using the latest beta version, and when adding a new keyframe, I received the following error:
“Cannot destructure property ‘interpolationMode’ of ‘params’ as it is undefined.”
I don’t, however, receive the error when trying to animate a Vec2.
Thank you for reporting this. I will ask engineering to have a look. Do you have a chunk of code I can send them?
This should replicate the issue:
import { _decorator, Component, CCFloat } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('TestAnimateNumber')
export class TestAnimateNumber extends Component {
@property({type: CCFloat, visible: true})
public _targetPercent: Number = 0;
public get targetPercent() {
return this._targetPercent;
}
public set targetPercent(value: Number) {
this._targetPercent = value;
}
update() {
console.log(this.targetPercent);
}
}
Can you provide an easy demo for me to test this issue?