AnimationClip.createWithSpriteFrames没有正常播放

let atlasUrl = ‘plist/’ + name ;

    resources.load(atlasUrl, SpriteAtlas, (err, spriteAtlas) => {  

        if (err) {  

            console.error(err);  

            return;  

        }

        let spriteFrames = spriteAtlas.getSpriteFrames();

        const animation = this.node.getComponent(Animation);  

        const clip = AnimationClip.createWithSpriteFrames(spriteFrames,10);

        clip.name = 'test';

        animation.addClip(clip);

        animation.play('test');

    })

图集资源正常加载了,也没有报错,就是没播放出来,不知道哪里有问题?

看下有没有加sprite组件

确实是这个问题 :rofl: