Animation not playing on dynamically loaded glb

Thanks that worked,
here the amended code for anyone finding this post:

    utils.loadGlbContainerFromAsset(this.glbAsset, null, this.glbAsset.name, function (err, asset) {
        var renderRootEntity = asset.resource.instantiateRenderEntity();
        self.entity.addChild(renderRootEntity);
        // add animation
        renderRootEntity.addComponent('anim', { activate: true });  
        renderRootEntity.anim.assignAnimation('clip', asset.resource.animations[0].resource);
        renderRootEntity.anim.baseLayer.transition("clip");
    });
2 Likes