Hi @dave seems like there is a little issue with layers, but I’m not sure.
Is option parameter required for constructor? According to code, it isn’t and there are default properties, but I can’t create layer without parameter.
I was just like:
var layer = new pc.Layer();
And I got
TypeError: Cannot read property 'id' of undefined
at new Layer (playcanvas-stable.js:16591)
at script.Ship.initialize (ShipControl.js?id=8882054:82)
at Func._scriptMethod (playcanvas-stable.js:24939)
at Func._onInitialize (playcanvas-stable.js:24956)
at Func._callComponentMethod (playcanvas-stable.js:25203)
at Func._onInitialize (playcanvas-stable.js:25209)
at Function.fire (playcanvas-stable.js:640)
at Function.initialize (playcanvas-stable.js:22349)
at Application.start (playcanvas-stable.js:21893)
at launch.js:6847
However var layer = new pc.Layer({});
works good