[0]laya3.0的spine是不是不支持外部图片设置附件

如题,我看官方的例子中是使用同一个图集的换装。支不支持使用外部的随便一张图片替换掉插槽上的附件?
我看unity跟cocos都是支持的。

1689242741628.jpg

如图。同样的功能我在unity实现了。
但是laya这边一直搞不出来。不知道是不是哪里搞错了。官方大佬能回答下么,谢谢啦~
下面是我做的demo


 
1689242741628.jpg
已邀请:

小高

赞同来自:

现已支持此功能,等待下次发版即可。

小高

赞同来自:

我们正在研究这个问题,之前负责这块的的同事离职了,还请耐心等待。

1689124599用户

赞同来自:

感谢了。有进展希望能同步下

layabox

赞同来自:

麻烦你扫码右下角的微信二维码,联系一下商务合作,沟通一下你的示例情况

1689124599用户

赞同来自:

问题已经查到了,问题出在draw函数
 
if (attachment instanceof this.templet.ns.RegionAttachment) {
let region = attachment;
renderable.vertices = this.vertices;
renderable.numVertices = 4;
renderable.numFloats = clippedVertexSize << 2;
region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);
triangles = QUAD_TRIANGLES;
uvs = region.uvs;
name = region.region.renderObject.page.name;
texture = this.templet.getTexture(name); 
 
this.templet.getTexture(name);
 这个方法返回的是spine自身使用的texture。但是这个
attachment现在使用的是外部的texture所以gettexture返回空,
我现在临时的做法是判断下是不是有效值
if (texture == null || texture == undefined){
texture = region.region.texture;

 
值无效的话直接用region上的texture。
后续看官方的处理。

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作