Hello,
I have a problem with an experience that we created some time ago. I tried to launch the project out of the editor and now it shows this error:
worldLayer.instances is undefined
RenderPass cannot be started while inside another render pass.
[outline-post-process.js?id=99952366&branchId=1eeb734b-1ed2-4c90-8bb8-4d1fae7262ba:348]: TypeError: worldLayer.instances is undefined
Experience loaded fine last time I used it 3-4 month ago…
Maybe some can point me in the right direction?
Thanks!
Your references code uses private functions, which changed. Something like this might work:
before
for (let mesh of worldLayer.instances.opaqueMeshInstances) {
if (mesh.originalMaterial == undefined) {
mesh.originalMaterial = mesh.material;
}
if (bool) {
mesh.material = this.getNormalMaterial();
} else {
mesh.material = mesh.originalMaterial;
}
}
now
for (let mesh of worldLayer.meshInstances) {
if (mesh.originalMaterial && mesh.originalMaterial.transparent)
continue;
if (mesh.originalMaterial == undefined) {
mesh.originalMaterial = mesh.material;
}
if (bool) {
mesh.material = this.getNormalMaterial();
} else {
mesh.material = mesh.originalMaterial;
}
}