[SOLVED] Migrating to new version. Stumped!

I am trying to move The Blob in St Peters - PLAYCANVAS to the new version. I am pretty stumped.

My attempt is here:

https://playcanvas.com/editor/scene/1249466

What are you migrating to/from? Scripting system? WebVR to WebXR?

Ah, I see the issue now. The script attributes were set up incorrectly.

Change:

var CustomShader = pc.createScript('customShader');

CustomShader.attributes.add("vs", "asset", null, {displayName: "Bubbles Vertex", type: "shader", max: 1});
CustomShader.attributes.add("fs", "asset", null, {displayName: "Bubbles Fragment", type: "shader", max: 1});
CustomShader.attributes.add('cubeMap', 'asset', null, {displayName: 'gallery', type: 'cubemap', max: 1});

To

var CustomShader = pc.createScript('customShader');

CustomShader.attributes.add("vs", {type: "asset", title: "Bubbles Vertex", assetType: "shader"});
CustomShader.attributes.add("fs", {type: "asset", title: "Bubbles Fragment", assetType: "shader"});
CustomShader.attributes.add("cubemap", {type: "asset", title: "gallery", assetType: "cubemap"});

And reparse the script in the Editor

1 Like