脚本里面读不到sprite.fillRange的值,赋值了fillRange,也没有覆盖编辑器中的fillRange的值,是什么原因呢,本人是小白,求助求助求助,是不是引擎bug?版本3.8.3
脚本代码如下:
import { _decorator, Component, Node, Sprite } from ‘cc’;
const { ccclass, property } = _decorator;
@ccclass(‘Card_ceshi’)
export class Card_ceshi extends Component {
@property(Node)
public card_ceshi: Sprite = null;
start() {
this.card_ceshi.fillType = Sprite.FillType.HORIZONTAL; // 确保填充类型设置正确
// this.card_ceshi.fillRange = 0.5; // 设置填充范围
console.log(this.card_ceshi.fillRange);
}
}
编辑器属性截图如下:

